You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I store my messages in firebase and am wondering if there is a clean way to create a session without having a .json or .csv file in my file system?
I thought I would try something like this:
chat_messages = []
for message in fb_messages:
chat_message = ChatMessage(
role=message['role'], content=message['content'])
chat_messages.append(chat_message)
ai.default_session.messages = chat_messages
ai("Hey there")
This stores the messages but when I call ai I get an error:
AttributeError: 'dict' object has no attribute 'model_dump'
This feels like a common enough use case that the solution could be abstracted into this library. I'm curious if there is either a reason for using files over in memory or if there is a way to upload an in memory list that I am missing?
The text was updated successfully, but these errors were encountered:
I store my messages in firebase and am wondering if there is a clean way to create a session without having a .json or .csv file in my file system?
I thought I would try something like this:
This stores the messages but when I call
ai
I get an error:This feels like a common enough use case that the solution could be abstracted into this library. I'm curious if there is either a reason for using files over in memory or if there is a way to upload an in memory list that I am missing?
The text was updated successfully, but these errors were encountered: