I started exploring the framework with the first example given in the introduction.
web_agent = Agent(
name="Web Agent",
model=Ollama(id="llama3.1"),
tools=[DuckDuckGo()],
instructions=["Always include sources"],
show_tool_calls=True,
markdown=True,
debug_mode=True
)
web_agent.print_response("Tell me about OpenAI Sora?", stream=True)
The only change being I use Ollama instead of OpenAI. But this does not return any results at all!!!
DEBUG Debug logs enabled
DEBUG *********** Agent Run Start: 807dfc51-6d89-414e-af69-3fe03e79c1f4 ***********
DEBUG Function duckduckgo_search from duckduckgo added to model.
DEBUG Function duckduckgo_news from duckduckgo added to model.
DEBUG ---------- Ollama Response Start ----------
DEBUG ============== system ==============
DEBUG ## Instructions
- Always include sources
- Use markdown to format your answers.
DEBUG ============== user ==============
DEBUG Tell me about OpenAI Sora?
DEBUG ============== assistant ==============
DEBUG {"name": "duckduckgo_search", "parameters": {"query": "OpenAI Sora", "max_results": "5"}}
DEBUG **************** METRICS START ****************
DEBUG * Time to first token: 4.2151s
DEBUG * Time to generate response: 5.2650s
DEBUG * Tokens per second: 5.5080 tokens/s
DEBUG * Input tokens: 354
DEBUG * Output tokens: 29
DEBUG * Total tokens: 383
DEBUG **************** METRICS END ******************
DEBUG ---------- Ollama Response End ----------
DEBUG Added 2 Messages to AgentMemory
DEBUG Added AgentRun to AgentMemory
DEBUG --**-- Logging Agent Run
DEBUG *********** Agent Run End: 807dfc51-6d89-414e-af69-3fe03e79c1f4 ***********
When I set stream=False, I do get the results. Some bug with stream=True?