View Source Store.Project.Conversation (fnord v0.5.8)
Conversations are stored per project in the project's store dir, under
converations/
. Each conversation is given a UUID identifier and stored as a
JSON file with the keys:
messages
: a list of messages in the conversationtimestamp
: the time the conversation was last written to
Existing conversations are retrieved by their UUID identifier.
Summary
Functions
Returns true if the conversation exists on disk, false otherwise.
Create a new conversation with a new UUID identifier and the globally selected project.
Create a new conversation from an existing UUID identifier and the globally selected project.
Create a new conversation from an existing UUID identifier and an explicitly specified project.
Returns the user's prompting message in the conversation. This is considered to be the first "user" role message in the conversation.
Reads the conversation from the store. Returns a tuple with the timestamp and the messages in the conversation.
Returns the timestamp of the conversation. If the conversation has not yet been saved to the store, returns 0.
Saves the conversation in the store. The conversation's timestamp is updated to the current time.
Functions
Returns true if the conversation exists on disk, false otherwise.
Create a new conversation with a new UUID identifier and the globally selected project.
Create a new conversation from an existing UUID identifier and the globally selected project.
Create a new conversation from an existing UUID identifier and an explicitly specified project.
Returns the user's prompting message in the conversation. This is considered to be the first "user" role message in the conversation.
Reads the conversation from the store. Returns a tuple with the timestamp and the messages in the conversation.
Returns the timestamp of the conversation. If the conversation has not yet been saved to the store, returns 0.
Saves the conversation in the store. The conversation's timestamp is updated to the current time.