mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-03 13:19:16 +00:00
Load, Save Conversation Session Summaries to Log. s/chat_log/chat_session
Conversation logs structure now has session info too instead of just chat info
Session info will allow loading past conversation summaries as context for AI in new conversations
{
"session": [
{
"summary": <chat_session_summary>,
"session-start": <session_start_index_in_chat_log>,
"session-end": <session_end_index_in_chat_log>
}],
"chat": [
{
"intent": <intent-object>
"trigger-emotion": <emotion-triggered-by-message>
"by": <AI|Human>
"message": <chat_message>
"created": <message_created_date>
}]
}
This commit is contained in:
@@ -96,10 +96,10 @@ class SearchConfig():
|
||||
|
||||
|
||||
class ConversationProcessorConfig():
|
||||
def __init__(self, conversation_logfile, chat_log, meta_log, openai_api_key, verbose):
|
||||
def __init__(self, conversation_logfile, chat_session, meta_log, openai_api_key, verbose):
|
||||
self.openai_api_key = openai_api_key
|
||||
self.conversation_logfile = conversation_logfile
|
||||
self.chat_log = chat_log
|
||||
self.chat_session = chat_session
|
||||
self.meta_log = meta_log
|
||||
self.verbose = verbose
|
||||
|
||||
@@ -110,7 +110,7 @@ class ConversationProcessorConfig():
|
||||
|
||||
return ConversationProcessorConfig(
|
||||
openai_api_key = conversation_config['openai-api-key'],
|
||||
chat_log = '',
|
||||
chat_session = '',
|
||||
meta_log = [],
|
||||
conversation_logfile = Path(conversation_config['conversation-logfile']),
|
||||
verbose = verbose)
|
||||
|
||||
Reference in New Issue
Block a user