format
This commit is contained in:
parent
7fa0c78298
commit
acfd344f88
@ -1,4 +1,5 @@
|
||||
import json # Import the json module
|
||||
|
||||
from qwen_agent.agents import Assistant
|
||||
|
||||
# Define LLM
|
||||
@ -45,7 +46,8 @@ tools = [
|
||||
bot = Assistant(llm=llm_cfg, function_list=tools)
|
||||
|
||||
# Streaming generation
|
||||
messages = [{'role': 'user', 'content': 'Write a 500 word blog post about the latest qwen 3 model. Use the search tool, and fetch the top 3 articles before you write the post. Write in a casual, but factual style - no hyperbole. Provide references to the webpages in the output.'}]
|
||||
messages = [{'role': 'user',
|
||||
'content': 'Write a 500 word blog post about the latest qwen 3 model. Use the search tool, and fetch the top 3 articles before you write the post. Write in a casual, but factual style - no hyperbole. Provide references to the webpages in the output.'}]
|
||||
|
||||
final_responses = None
|
||||
# Consider adding error handling around bot.run
|
||||
@ -56,7 +58,6 @@ try:
|
||||
except Exception as e:
|
||||
print(f"An error occurred during agent execution: {e}")
|
||||
|
||||
|
||||
# Pretty-print the final response object
|
||||
if final_responses:
|
||||
print("--- Full Response Object ---")
|
||||
|
Loading…
x
Reference in New Issue
Block a user