[Update] Default LLM (#3587)
This commit is contained in:
@@ -49,7 +49,7 @@ local_config = {
|
||||
"llm": {
|
||||
"provider": "openai",
|
||||
"config": {
|
||||
"model": "gpt-4o-mini",
|
||||
"model": "gpt-4.1-nano-2025-04-14",
|
||||
"temperature": 0.1,
|
||||
"max_tokens": 2000,
|
||||
},
|
||||
|
||||
@@ -36,7 +36,7 @@ from agno.tools.mem0 import Mem0Tools
|
||||
|
||||
agent = Agent(
|
||||
name="Memory Agent",
|
||||
model=OpenAIChat(id="gpt-4o-mini"),
|
||||
model=OpenAIChat(id="gpt-4.1-nano-2025-04-14"),
|
||||
tools=[Mem0Tools()],
|
||||
description="An assistant that remembers and personalizes using Mem0 memory."
|
||||
)
|
||||
|
||||
@@ -55,7 +55,7 @@ config = {
|
||||
"llm": {
|
||||
"provider": "openai",
|
||||
"config": {
|
||||
"model": "gpt-4o-mini",
|
||||
"model": "gpt-4.1-nano-2025-04-14",
|
||||
"temperature": 0.0,
|
||||
"api_key": keywordsai_api_key,
|
||||
"openai_base_url": base_url,
|
||||
@@ -101,7 +101,7 @@ messages = [
|
||||
|
||||
# Add memory and generate a response
|
||||
response = client.chat.completions.create(
|
||||
model="openai/gpt-4o",
|
||||
model="openai/gpt-4.1-nano",
|
||||
messages=messages,
|
||||
extra_body={
|
||||
"mem0_params": {
|
||||
|
||||
@@ -39,7 +39,7 @@ load_dotenv()
|
||||
# os.environ["MEM0_API_KEY"] = "your-mem0-api-key"
|
||||
|
||||
# Initialize LangChain and Mem0
|
||||
llm = ChatOpenAI(model="gpt-4o-mini")
|
||||
llm = ChatOpenAI(model="gpt-4.1-nano-2025-04-14")
|
||||
mem0 = MemoryClient()
|
||||
```
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ async def entrypoint(ctx: JobContext):
|
||||
|
||||
session = AgentSession(
|
||||
stt=deepgram.STT(),
|
||||
llm=openai.LLM(model="gpt-4o-mini"),
|
||||
llm=openai.LLM(model="gpt-4.1-nano-2025-04-14"),
|
||||
tts=openai.TTS(voice="ash",),
|
||||
turn_detection=EnglishModel(),
|
||||
vad=silero.VAD.load(),
|
||||
|
||||
@@ -83,7 +83,7 @@ config = {
|
||||
"llm": {
|
||||
"provider": "openai",
|
||||
"config": {
|
||||
"model": "gpt-4o",
|
||||
"model": "gpt-4.1-nano-2025-04-14",
|
||||
"temperature": 0.2,
|
||||
"max_tokens": 2000,
|
||||
},
|
||||
@@ -116,7 +116,7 @@ from dotenv import load_dotenv
|
||||
load_dotenv()
|
||||
|
||||
# os.environ["OPENAI_API_KEY"] = "<your-openai-api-key>"
|
||||
llm = OpenAI(model="gpt-4o-mini")
|
||||
llm = OpenAI(model="gpt-4.1-nano-2025-04-14")
|
||||
```
|
||||
|
||||
### SimpleChatEngine
|
||||
|
||||
@@ -106,7 +106,7 @@ const mem0Agent = new Agent({
|
||||
Use the Mem0-memorize tool to save important information that might be useful later.
|
||||
Use the Mem0-remember tool to recall previously saved information when answering questions.
|
||||
`,
|
||||
model: openai('gpt-4o'),
|
||||
model: openai('gpt-4.1-nano'),
|
||||
tools: { mem0RememberTool, mem0MemorizeTool },
|
||||
});
|
||||
```
|
||||
|
||||
@@ -63,7 +63,7 @@ agent = Agent(
|
||||
Use the save_memory tool to store important information about the user.
|
||||
Always personalize your responses based on available memory.""",
|
||||
tools=[search_memory, save_memory],
|
||||
model="gpt-4o"
|
||||
model="gpt-4.1-nano-2025-04-14"
|
||||
)
|
||||
|
||||
def chat_with_agent(user_input: str, user_id: str) -> str:
|
||||
@@ -114,7 +114,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(
|
||||
@@ -123,7 +123,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
|
||||
@@ -134,7 +134,7 @@ triage_agent = Agent(
|
||||
For health-related questions (fitness, diet, wellness, exercise), hand off to the Health Advisor.
|
||||
For general questions, handle them directly using available tools.""",
|
||||
handoffs=[travel_agent, health_agent],
|
||||
model="gpt-4o"
|
||||
model="gpt-4.1-nano-2025-04-14"
|
||||
)
|
||||
|
||||
def chat_with_handoffs(user_input: str, user_id: str) -> str:
|
||||
|
||||
Reference in New Issue
Block a user