Update agent.py
Browse files
agent.py
CHANGED
@@ -179,10 +179,13 @@ def build_graph():
|
|
179 |
"""Build LangGrapth graph of agent."""
|
180 |
|
181 |
# Language model and tools
|
182 |
-
llm =
|
183 |
-
|
184 |
-
|
185 |
-
|
|
|
|
|
|
|
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 |
|