Ahmud commited on
Commit
deddd69
·
verified ·
1 Parent(s): 3fe3b6d

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +8 -8
agent.py CHANGED
@@ -20,9 +20,9 @@ langsmith_api_key = os.getenv("LANGSMITH_API_KEY")
20
  langsmith_tracing = os.getenv("LANGSMITH_TRACING")
21
 
22
  llm = ChatOpenAI(
23
- base_url="https://openrouter.ai/api/v1",
24
- api_key=os.getenv("OPENROUTER_API_KEY"),
25
- model="moonshotai/kimi-k2:free", # Model must support function calling in OpenRouter
26
  temperature=1
27
  )
28
 
@@ -104,10 +104,10 @@ gaia_agent = builder.compile() # converts my builder into a runnable agent by u
104
  class LangGraphAgent:
105
  def __init__(self):
106
  self.api_keys = [
107
- os.getenv("OPENROUTER_API_KEY"),
108
- os.getenv("OPENROUTER_API_KEY_1"),
109
- os.getenv("OPENROUTER_API_KEY_2"),
110
- os.getenv("OPENROUTER_API_KEY_3")
111
  ]
112
  self.key_index = 0
113
  print("LangGraphAgent initialized.")
@@ -119,7 +119,7 @@ class LangGraphAgent:
119
  llm = ChatOpenAI(
120
  base_url="https://openrouter.ai/api/v1",
121
  api_key=api_key,
122
- model="moonshotai/kimi-k2:free",
123
  temperature=1
124
  )
125
  llm_with_tools = llm.bind_tools(tools)
 
20
  langsmith_tracing = os.getenv("LANGSMITH_TRACING")
21
 
22
  llm = ChatOpenAI(
23
+ base_url="https://api.groq.com/openai/v1",
24
+ api_key=os.getenv("GROQ_API_KEY"),
25
+ model="openai/gpt-oss-120b", # Model must support function calling in OpenRouter
26
  temperature=1
27
  )
28
 
 
104
  class LangGraphAgent:
105
  def __init__(self):
106
  self.api_keys = [
107
+ os.getenv("GROQ_API_KEY"),
108
+ os.getenv("GROQ_API_KEY_1"),
109
+ os.getenv("GROQ_API_KEY_2"),
110
+ os.getenv("GROQ_API_KEY_3")
111
  ]
112
  self.key_index = 0
113
  print("LangGraphAgent initialized.")
 
119
  llm = ChatOpenAI(
120
  base_url="https://openrouter.ai/api/v1",
121
  api_key=api_key,
122
+ model="openai/gpt-oss-120b",
123
  temperature=1
124
  )
125
  llm_with_tools = llm.bind_tools(tools)