superone001 commited on
Commit
9f3fd39
·
verified ·
1 Parent(s): aae24a5

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +7 -4
agent.py CHANGED
@@ -179,10 +179,13 @@ def build_graph():
179
  """Build LangGrapth graph of agent."""
180
 
181
  # Language model and tools
182
- llm = ChatOpenAI(
183
- model="gpt-4.1",
184
- temperature=0,
185
- max_retries=2
 
 
 
186
  )
187
  llm_with_tools = llm.bind_tools(tools, strict=True)
188
 
 
179
  """Build LangGrapth graph of agent."""
180
 
181
  # Language model and tools
182
+ llm = HuggingFaceEndpoint(
183
+ endpoint_url="https://api-inference.huggingface.co/models/mistralai/Mistral-7B-Instruct-v0.2",
184
+ max_new_tokens=500, # 直接指定
185
+ temperature=0.1, # 直接指定
186
+ repetition_penalty=1.2, # 直接指定
187
+ top_p=0.9, # 可选参数
188
+ # 其他参数也可以直接在这里指定
189
  )
190
  llm_with_tools = llm.bind_tools(tools, strict=True)
191