diff --git a/characterai/aiocai/methods/chat2.py b/characterai/aiocai/methods/chat2.py index edfd716..04d9591 100644 --- a/characterai/aiocai/methods/chat2.py +++ b/characterai/aiocai/methods/chat2.py @@ -266,7 +266,7 @@ async def new_chat( Returns: :obj:`~characterai.types.chat2.BotAnswer` """ - chat_id = str(uuid.uuid4()) or chat_id + chat_id = chat_id or uuid.uuid4().hex if isinstance(creator_id, int): creator_id = str(creator_id) @@ -460,4 +460,4 @@ async def __aexit__(self, *args): await self.close() async def close(self): - return await self.ws.close() \ No newline at end of file + return await self.ws.close()