[Update] Default LLM (#3587)
This commit is contained in:
@@ -225,7 +225,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 24,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@@ -239,7 +239,7 @@
|
||||
" # Generate Assistant response\n",
|
||||
" system_prompt = f\"You are a helpful AI. Answer the question based on query and memories.\\nUser Memories:\\n{memories_str}\"\n",
|
||||
" messages = [{\"role\": \"system\", \"content\": system_prompt}, {\"role\": \"user\", \"content\": message}]\n",
|
||||
" response = openai_client.chat.completions.create(model=\"gpt-4o-mini\", messages=messages)\n",
|
||||
" response = openai_client.chat.completions.create(model=\"gpt-4.1-nano-2025-04-14\", messages=messages)\n",
|
||||
" assistant_response = response.choices[0].message.content\n",
|
||||
"\n",
|
||||
" # Create new memories from the conversation\n",
|
||||
|
||||
@@ -37,7 +37,7 @@ food_agent = Agent(
|
||||
name="Personal Food Assistant",
|
||||
description="Provides personalized food recommendations with memory and generates voice responses using Cartesia TTS tools.",
|
||||
instructions=agent_instructions,
|
||||
model=OpenAIChat(id="gpt-4o"),
|
||||
model=OpenAIChat(id="gpt-4.1-nano-2025-04-14"),
|
||||
tools=[CartesiaTools(voice_localize_enabled=True)],
|
||||
show_tool_calls=True,
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""
|
||||
Simple Fitness Memory Tracker that tracks your fitness progress and knows your health priorities.
|
||||
Uses Mem0 for memory and GPT-4o for image understanding.
|
||||
Uses Mem0 for memory and gpt-4.1-nano for image understanding.
|
||||
|
||||
In order to run this file, you need to set up your Mem0 API at Mem0 platform and also need an OpenAI API key.
|
||||
export OPENAI_API_KEY="your_openai_api_key"
|
||||
@@ -18,7 +18,7 @@ USER_ID = "Anish"
|
||||
|
||||
agent = Agent(
|
||||
name="Fitness Agent",
|
||||
model=OpenAIChat(id="gpt-4o"),
|
||||
model=OpenAIChat(id="gpt-4.1-nano-2025-04-14"),
|
||||
description="You are a helpful fitness assistant who remembers past logs and gives personalized suggestions for Anish's training and diet.",
|
||||
markdown=True,
|
||||
)
|
||||
|
||||
@@ -34,7 +34,7 @@ memory = MemoryClient()
|
||||
# Research team models with specialized roles
|
||||
RESEARCH_TEAM = {
|
||||
"tech_analyst": {
|
||||
"model": "gpt-4o",
|
||||
"model": "gpt-4.1-nano-2025-04-14",
|
||||
"role": "Technical Analyst - Code review, architecture, and technical decisions",
|
||||
},
|
||||
"writer": {
|
||||
@@ -42,7 +42,7 @@ RESEARCH_TEAM = {
|
||||
"role": "Documentation Writer - Clear explanations and user guides",
|
||||
},
|
||||
"data_analyst": {
|
||||
"model": "gpt-4o-mini",
|
||||
"model": "gpt-4.1-nano-2025-04-14",
|
||||
"role": "Data Analyst - Insights, trends, and data-driven recommendations",
|
||||
},
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ client = MemoryClient()
|
||||
# Define the agent
|
||||
agent = Agent(
|
||||
name="Personal Agent",
|
||||
model=OpenAIChat(id="gpt-4o"),
|
||||
model=OpenAIChat(id="gpt-4.1-nano-2025-04-14"),
|
||||
description="You are a helpful personal agent that helps me with day to day activities."
|
||||
"You can process both text and images.",
|
||||
markdown=True,
|
||||
|
||||
@@ -35,7 +35,7 @@ BE IT TIME, LOCATION, USER'S PERSONAL LIFE, CHOICES, USER'S PREFERENCES, we need
|
||||
'''
|
||||
)
|
||||
|
||||
llm = ChatOpenAI(model="gpt-4o-mini", temperature=0.2)
|
||||
llm = ChatOpenAI(model="gpt-4.1-nano-2025-04-14", temperature=0.2)
|
||||
|
||||
|
||||
def setup_user_history(user_id):
|
||||
|
||||
@@ -35,7 +35,7 @@ travel_agent = Agent(
|
||||
understand the user's travel preferences and history before making recommendations.
|
||||
After providing your response, use store_conversation to save important details.""",
|
||||
tools=[search_memory, save_memory],
|
||||
model="gpt-4o",
|
||||
model="gpt-4.1-nano-2025-04-14",
|
||||
)
|
||||
|
||||
health_agent = Agent(
|
||||
@@ -44,7 +44,7 @@ health_agent = Agent(
|
||||
understand the user's health goals and dietary preferences.
|
||||
After providing advice, use store_conversation to save relevant information.""",
|
||||
tools=[search_memory, save_memory],
|
||||
model="gpt-4o",
|
||||
model="gpt-4.1-nano-2025-04-14",
|
||||
)
|
||||
|
||||
# Triage agent with handoffs
|
||||
@@ -55,7 +55,7 @@ triage_agent = Agent(
|
||||
For health-related questions (fitness, diet, wellness, exercise), hand off to Health Advisor.
|
||||
For general questions, you can handle them directly using available tools.""",
|
||||
handoffs=[travel_agent, health_agent],
|
||||
model="gpt-4o",
|
||||
model="gpt-4.1-nano-2025-04-14",
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ class MultiAgentLearningSystem:
|
||||
|
||||
def __init__(self, student_id: str):
|
||||
self.student_id = student_id
|
||||
self.llm = OpenAI(model="gpt-4o", temperature=0.2)
|
||||
self.llm = OpenAI(model="gpt-4.1-nano-2025-04-14", temperature=0.2)
|
||||
|
||||
# Memory context for this student
|
||||
self.memory_context = {"user_id": student_id, "app": "learning_assistant"}
|
||||
|
||||
@@ -172,7 +172,7 @@ export const useChat = ({ user, mem0ApiKey, openaiApiKey }: UseChatProps): UseCh
|
||||
}
|
||||
|
||||
const completion = await openai.chat.completions.create({
|
||||
model: "gpt-4o-mini",
|
||||
model: "gpt-4.1-nano-2025-04-14",
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-expect-error
|
||||
messages: messagesForLLM.map(msg => ({
|
||||
|
||||
@@ -172,7 +172,7 @@ export const useChat = ({ user, mem0ApiKey, openaiApiKey }: UseChatProps): UseCh
|
||||
}
|
||||
|
||||
const completion = await openai.chat.completions.create({
|
||||
model: "gpt-4o-mini",
|
||||
model: "gpt-4.1-nano-2025-04-14",
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-expect-error
|
||||
messages: messagesForLLM.map(msg => ({
|
||||
|
||||
Reference in New Issue
Block a user