Update README.md

This commit is contained in:
cheng 2025-04-28 07:25:56 +00:00 committed by system
parent 1aecd22f7a
commit 88f1f1f768
No known key found for this signature in database
GPG Key ID: 6A528E38E0733467

View File

@ -202,7 +202,6 @@ Qwen3 excels in tool calling capabilities. We recommend using [Qwen-Agent](https
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.
```python
import os
from qwen_agent.agents import Assistant
# Define LLM
@ -232,6 +231,10 @@ tools = [
'command': 'uvx',
'args': ['mcp-server-time', '--local-timezone=Asia/Shanghai']
},
"fetch": {
"command": "uvx",
"args": ["mcp-server-fetch"]
}
}
},
'code_interpreter', # Built-in tools
@ -241,7 +244,7 @@ tools = [
bot = Assistant(llm=llm_cfg, function_list=tools)
# Streaming generation
messages = [{'role': 'user', 'content': 'What time is it?'}]
messages = [{'role': 'user', 'content': 'https://qwenlm.github.io/blog/ Introduce the latest developments of Qwen'}]
for responses in bot.run(messages=messages):
pass
print(responses)