Spaces:
Sleeping
Sleeping
Update agent_service.py
Browse files- agent_service.py +4 -4
agent_service.py
CHANGED
|
@@ -314,14 +314,14 @@ class AgentService:
|
|
| 314 |
client = AsyncInferenceClient(token=self.hf_token)
|
| 315 |
|
| 316 |
# Call HF API with chat completion and native tools
|
| 317 |
-
#
|
| 318 |
response = await client.chat_completion(
|
| 319 |
messages=messages,
|
| 320 |
-
model="Qwen/Qwen2.5-
|
| 321 |
-
max_tokens=1024,
|
| 322 |
temperature=0.7,
|
| 323 |
tools=tools,
|
| 324 |
-
tool_choice="auto"
|
| 325 |
)
|
| 326 |
|
| 327 |
# Check if the model made tool calls
|
|
|
|
| 314 |
client = AsyncInferenceClient(token=self.hf_token)
|
| 315 |
|
| 316 |
# Call HF API with chat completion and native tools
|
| 317 |
+
# Qwen2.5-72B-Instruct: Best for Vietnamese - state-of-the-art performance
|
| 318 |
response = await client.chat_completion(
|
| 319 |
messages=messages,
|
| 320 |
+
model="Qwen/Qwen2.5-72B-Instruct", # Best for Vietnamese + tool calling
|
| 321 |
+
max_tokens=1024, # Increased to prevent truncation
|
| 322 |
temperature=0.7,
|
| 323 |
tools=tools,
|
| 324 |
+
tool_choice="auto" # Let model decide when to use tools
|
| 325 |
)
|
| 326 |
|
| 327 |
# Check if the model made tool calls
|