[Update] Default LLM (#3587)

This commit is contained in:
Parshva Daftari
2025-10-15 23:49:52 +05:30
committed by GitHub
parent a40314c971
commit 41cfb3ab1a
74 changed files with 136 additions and 136 deletions
+2 -2
View File
@@ -202,7 +202,7 @@ async def chat_with_memories(message: str, user_id: str = "default_user") -> str
# Generate assistant response
system_prompt = f"You are a helpful AI. Answer the question based on query and memories.\nUser Memories:\n{memories_str}"
messages = [{"role": "system", "content": system_prompt}, {"role": "user", "content": message}]
response = await async_openai_client.chat.completions.create(model="gpt-4o-mini", messages=messages)
response = await async_openai_client.chat.completions.create(model="gpt-4.1-nano-2025-04-14", messages=messages)
assistant_response = response.choices[0].message.content
# Create new memories from the conversation
@@ -249,7 +249,7 @@ async def handle_initialization_errors():
# Initialize with custom config
config = MemoryConfig(
vector_store={"provider": "chroma", "config": {"path": "./chroma_db"}},
llm={"provider": "openai", "config": {"model": "gpt-4o-mini"}}
llm={"provider": "openai", "config": {"model": "gpt-4.1-nano-2025-04-14"}}
)
memory = AsyncMemory(config=config)
print("AsyncMemory initialized successfully")