Spaces:
Configuration error
Configuration error
configure groq
Browse files
agent.py
CHANGED
|
@@ -71,11 +71,13 @@ Your response must always begin with: FINAL ANSWER:
|
|
| 71 |
|
| 72 |
|
| 73 |
def build_agent_graph(provider: str = "groq"):
|
|
|
|
|
|
|
| 74 |
# Define toolset
|
| 75 |
tools = [search_web_sources, run_python_code]
|
| 76 |
|
| 77 |
# Instantiate LLM
|
| 78 |
-
llm = ChatGroq(model="qwen-qwq-32b", temperature=0)
|
| 79 |
|
| 80 |
# Bind tools to the LLM
|
| 81 |
llm_with_tools = llm.bind_tools(tools)
|
|
|
|
| 71 |
|
| 72 |
|
| 73 |
def build_agent_graph(provider: str = "groq"):
|
| 74 |
+
groq_api_key = os.environ.get("GROQ_API_KEY")
|
| 75 |
+
|
| 76 |
# Define toolset
|
| 77 |
tools = [search_web_sources, run_python_code]
|
| 78 |
|
| 79 |
# Instantiate LLM
|
| 80 |
+
llm = ChatGroq(model="qwen-qwq-32b", temperature=0, api_key=groq_api_key)
|
| 81 |
|
| 82 |
# Bind tools to the LLM
|
| 83 |
llm_with_tools = llm.bind_tools(tools)
|