Closed Cyberes closed 2 months ago
I add below code to sydney.py
async def save_conversation(self, filename) -> None:
with open(filename, "w") as f:
f.write(
json.dumps(
{
"conversation_signature": self.conversation_signature,
"encrypted_conversation_signature": self.encrypted_conversation_signature,
"conversation_id": self.conversation_id,
"client_id": self.client_id,
"invocation_id": self.invocation_id,
# "number_of_messages": self.number_of_messages,
# "max_messages": self.max_messages
}
),
)
async def load_conversation(self, filename) -> None:
with open(filename) as f:
conversation = json.load(f)
self.conversation_signature = conversation["conversation_signature"]
self.encrypted_conversation_signature = conversation["encrypted_conversation_signature"]
self.conversation_id = conversation["conversation_id"]
self.client_id = conversation["client_id"]
self.invocation_id = conversation["invocation_id"]
# self.number_of_messages = conversation["number_of_messages"]
# self.max_messages = conversation["max_messages"]
I was wondering if I could just build the conversation myself like you did! Thanks my guy
Actually, this sort of works. But the AI seems to be stuck on the first response regardless of any subsequent queries I send it.
aw nvm lol
Tôi đã tự hỏi liệu tôi có thể tự xây dựng cuộc trò chuyện như bạn đã làm không! Cảm ơn chàng trai của tôi
Don't load_conversation on first query
Hi, thanks for the great project. Would it be possible to implement loading previous conversations? Currently, we can only start a new conversation and reset the current one.
My current solution is probably going to try pickling the
sydney
object and store it in a sqlite3 database. It would be cool to load conversations natively instead.