Spaces:
Sleeping
Sleeping
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
import os
|
| 2 |
from langchain_google_genai import ChatGoogleGenerativeAI
|
|
|
|
| 3 |
from langgraph.graph import START, StateGraph, MessagesState
|
| 4 |
from langgraph.prebuilt import tools_condition
|
| 5 |
from langgraph.prebuilt import ToolNode
|
|
@@ -10,7 +11,7 @@ from typing import TypedDict
|
|
| 10 |
tools = [add, substract, multiply, divide, web_search]
|
| 11 |
|
| 12 |
def build_agent():
|
| 13 |
-
llm = ChatGoogleGenerativeAI(model="gemini-2.0-flash", temperature=0)
|
| 14 |
chat_with_tools = llm.bind_tools(tools)
|
| 15 |
|
| 16 |
def assistant(state: MessagesState):
|
|
|
|
| 1 |
import os
|
| 2 |
from langchain_google_genai import ChatGoogleGenerativeAI
|
| 3 |
+
from langchain_groq import ChatGroq
|
| 4 |
from langgraph.graph import START, StateGraph, MessagesState
|
| 5 |
from langgraph.prebuilt import tools_condition
|
| 6 |
from langgraph.prebuilt import ToolNode
|
|
|
|
| 11 |
tools = [add, substract, multiply, divide, web_search]
|
| 12 |
|
| 13 |
def build_agent():
|
| 14 |
+
llm = llm = ChatGroq(model="qwen-qwq-32b", temperature=0) # ChatGoogleGenerativeAI(model="gemini-2.0-flash", temperature=0)
|
| 15 |
chat_with_tools = llm.bind_tools(tools)
|
| 16 |
|
| 17 |
def assistant(state: MessagesState):
|