diff --git a/agentic_search.py b/agentic_search.py index c409a67..55f9d04 100644 --- a/agentic_search.py +++ b/agentic_search.py @@ -41,15 +41,16 @@ tools = [ bot = Assistant(llm=llm_cfg, function_list=tools) # Streaming generation -messages = [{'role': 'user', 'content': 'https://qwenlm.github.io/blog/ Sumarize the latest developments of Qwen'}] +messages = [{'role': 'user', 'content': 'fetch https://qwenlm.github.io/blog/ and give me a summery of the energy efficiency of training and inference of Qwen'}] # Initialize responses variable before the loop in case the loop doesn't run final_responses = None -for responses in bot.run(messages=messages): +for responses in bot.run(messages=messages, enable_thinking=True,max_tokens=8192): # The loop assigns the latest response to final_responses final_responses = responses # Pretty-print the final response object if final_responses: print(json.dumps(final_responses, indent=2)) # Use indent=2 (or 4) for pretty printing + print(final_responses['content']) else: print("No response received from the agent.") \ No newline at end of file