Closed Arutemu64 closed 8 months ago
Here I'm trying to reset the chat by using new_chat (I hope I'm doing it right...)
chat = (await cai_client.chat2.get_chat(CHAR))["chats"][0] user = (await cai_client.user.info())["user"]["user"] async with cai_client.connect() as chat2: await chat2.new_chat( char=env("CHAR"), chat_id=chat["chat_id"], creator_id=str(user["id"]), )
And here's what I receive
File "~~~\Lib\site-packages\characterai\pyasynccai.py", line 718, in new_chat raise errors.ServerError(response['comment']) characterai.errors.ServerError: create_chat already exists
Answering my question, chat_id can be anything, it's not explicitly server-generated, but it should not exist before. Timestamp is good enough as a chat_id.
Here I'm trying to reset the chat by using new_chat (I hope I'm doing it right...)
And here's what I receive