AC-Angelo93 commited on
Commit
b26e0e5
Β·
verified Β·
1 Parent(s): fbe0834

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +3 -12
agent.py CHANGED
@@ -10,6 +10,7 @@ from serpapi import GoogleSearch
10
  # 1️⃣ Switch Graph β†’ StateGraph
11
  from langgraph.graph import StateGraph
12
  #from langchain_core.language_models.llms import LLM
 
13
  from langchain_huggingface import ChatHuggingFace, HuggingFaceEndpoint
14
  from langchain_core.messages import SystemMessage, HumanMessage
15
  from langchain_core.tools import tool
@@ -132,18 +133,8 @@ class AgentState(TypedDict):
132
  # ────────────────
133
  # 6️⃣ Build the StateGraph
134
  # ────────────────
135
- def build_graph(provider: str = "huggingface") -> StateGraph:
136
- # Instantiate LLM
137
- endpoint_url = "https://api-inference.huggingface.co/models/Qwen/Qwen-7B"
138
- hf_token = os.getenv("HF_TOKEN")
139
- if not hf_token:
140
- raise ValueError("HF_TOKEN missing in env")
141
- llm = ChatHuggingFace(
142
- llm=HuggingFaceEndpoint(
143
- endpoint_url=endpoint_url,
144
- temperature=0.0,
145
- huggingfacehub_api_token= hf_token,
146
-
147
  )
148
  )
149
 
 
10
  # 1️⃣ Switch Graph β†’ StateGraph
11
  from langgraph.graph import StateGraph
12
  #from langchain_core.language_models.llms import LLM
13
+ from langchain_groq import ChatGroq
14
  from langchain_huggingface import ChatHuggingFace, HuggingFaceEndpoint
15
  from langchain_core.messages import SystemMessage, HumanMessage
16
  from langchain_core.tools import tool
 
133
  # ────────────────
134
  # 6️⃣ Build the StateGraph
135
  # ────────────────
136
+ def build_graph(provider: str = "groq") -> StateGraph:
137
+ llm = ChatGroq(model="qwen-qwq-32b", temperature=0)
 
 
 
 
 
 
 
 
 
 
138
  )
139
  )
140