Update README.md
Browse files
README.md
CHANGED
|
@@ -202,7 +202,6 @@ Qwen3 excels in tool calling capabilities. We recommend using [Qwen-Agent](https
|
|
| 202 |
|
| 203 |
To define the available tools, you can use the MCP configuration file, use the integrated tool of Qwen-Agent, or integrate other tools by yourself.
|
| 204 |
```python
|
| 205 |
-
import os
|
| 206 |
from qwen_agent.agents import Assistant
|
| 207 |
|
| 208 |
# Define LLM
|
|
@@ -232,6 +231,10 @@ tools = [
|
|
| 232 |
'command': 'uvx',
|
| 233 |
'args': ['mcp-server-time', '--local-timezone=Asia/Shanghai']
|
| 234 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
| 235 |
}
|
| 236 |
},
|
| 237 |
'code_interpreter', # Built-in tools
|
|
@@ -241,7 +244,7 @@ tools = [
|
|
| 241 |
bot = Assistant(llm=llm_cfg, function_list=tools)
|
| 242 |
|
| 243 |
# Streaming generation
|
| 244 |
-
messages = [{'role': 'user', 'content': '
|
| 245 |
for responses in bot.run(messages=messages):
|
| 246 |
pass
|
| 247 |
print(responses)
|
|
|
|
| 202 |
|
| 203 |
To define the available tools, you can use the MCP configuration file, use the integrated tool of Qwen-Agent, or integrate other tools by yourself.
|
| 204 |
```python
|
|
|
|
| 205 |
from qwen_agent.agents import Assistant
|
| 206 |
|
| 207 |
# Define LLM
|
|
|
|
| 231 |
'command': 'uvx',
|
| 232 |
'args': ['mcp-server-time', '--local-timezone=Asia/Shanghai']
|
| 233 |
},
|
| 234 |
+
"fetch": {
|
| 235 |
+
"command": "uvx",
|
| 236 |
+
"args": ["mcp-server-fetch"]
|
| 237 |
+
}
|
| 238 |
}
|
| 239 |
},
|
| 240 |
'code_interpreter', # Built-in tools
|
|
|
|
| 244 |
bot = Assistant(llm=llm_cfg, function_list=tools)
|
| 245 |
|
| 246 |
# Streaming generation
|
| 247 |
+
messages = [{'role': 'user', 'content': 'https://qwenlm.github.io/blog/ Introduce the latest developments of Qwen'}]
|
| 248 |
for responses in bot.run(messages=messages):
|
| 249 |
pass
|
| 250 |
print(responses)
|