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.
|
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
|
```python
|
||||||
import os
|
|
||||||
from qwen_agent.agents import Assistant
|
from qwen_agent.agents import Assistant
|
||||||
|
|
||||||
# Define LLM
|
# Define LLM
|
||||||
@ -232,6 +231,10 @@ tools = [
|
|||||||
'command': 'uvx',
|
'command': 'uvx',
|
||||||
'args': ['mcp-server-time', '--local-timezone=Asia/Shanghai']
|
'args': ['mcp-server-time', '--local-timezone=Asia/Shanghai']
|
||||||
},
|
},
|
||||||
|
"fetch": {
|
||||||
|
"command": "uvx",
|
||||||
|
"args": ["mcp-server-fetch"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'code_interpreter', # Built-in tools
|
'code_interpreter', # Built-in tools
|
||||||
@ -241,7 +244,7 @@ tools = [
|
|||||||
bot = Assistant(llm=llm_cfg, function_list=tools)
|
bot = Assistant(llm=llm_cfg, function_list=tools)
|
||||||
|
|
||||||
# Streaming generation
|
# 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):
|
for responses in bot.run(messages=messages):
|
||||||
pass
|
pass
|
||||||
print(responses)
|
print(responses)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user