Update README.md
This commit is contained in:
parent
1aecd22f7a
commit
88f1f1f768
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user