Update smolagents from 1.13.0 to 1.26.0 with breaking change fixes
#717
by mbilvl - opened
- app.py +3 -6
- prompts.yaml +3 -0
- requirements.txt +1 -1
app.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
-
from smolagents import CodeAgent,DuckDuckGoSearchTool,
|
|
|
|
| 2 |
import datetime
|
| 3 |
import requests
|
| 4 |
import pytz
|
|
@@ -39,7 +40,7 @@ final_answer = FinalAnswerTool()
|
|
| 39 |
# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
|
| 40 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
| 41 |
|
| 42 |
-
model =
|
| 43 |
max_tokens=2096,
|
| 44 |
temperature=0.5,
|
| 45 |
model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
|
|
@@ -58,10 +59,6 @@ agent = CodeAgent(
|
|
| 58 |
tools=[final_answer], ## add your tools here (don't remove final answer)
|
| 59 |
max_steps=6,
|
| 60 |
verbosity_level=1,
|
| 61 |
-
grammar=None,
|
| 62 |
-
planning_interval=None,
|
| 63 |
-
name=None,
|
| 64 |
-
description=None,
|
| 65 |
prompt_templates=prompt_templates
|
| 66 |
)
|
| 67 |
|
|
|
|
| 1 |
+
from smolagents import CodeAgent, DuckDuckGoSearchTool, load_tool, tool
|
| 2 |
+
from smolagents.models import InferenceClientModel
|
| 3 |
import datetime
|
| 4 |
import requests
|
| 5 |
import pytz
|
|
|
|
| 40 |
# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
|
| 41 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
| 42 |
|
| 43 |
+
model = InferenceClientModel(
|
| 44 |
max_tokens=2096,
|
| 45 |
temperature=0.5,
|
| 46 |
model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
|
|
|
|
| 59 |
tools=[final_answer], ## add your tools here (don't remove final answer)
|
| 60 |
max_steps=6,
|
| 61 |
verbosity_level=1,
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
prompt_templates=prompt_templates
|
| 63 |
)
|
| 64 |
|
prompts.yaml
CHANGED
|
@@ -319,3 +319,6 @@
|
|
| 319 |
"report": |-
|
| 320 |
Here is the final answer from your managed agent '{{name}}':
|
| 321 |
{{final_answer}}
|
|
|
|
|
|
|
|
|
|
|
|
| 319 |
"report": |-
|
| 320 |
Here is the final answer from your managed agent '{{name}}':
|
| 321 |
{{final_answer}}
|
| 322 |
+
"final_answer":
|
| 323 |
+
"pre_messages": ""
|
| 324 |
+
"post_messages": ""
|
requirements.txt
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
markdownify
|
| 2 |
-
|
| 3 |
requests
|
| 4 |
duckduckgo_search
|
| 5 |
pandas
|
|
|
|
| 1 |
markdownify
|
| 2 |
+
smolagent==1.26.0
|
| 3 |
requests
|
| 4 |
duckduckgo_search
|
| 5 |
pandas
|