Skip to content

Instantly share code, notes, and snippets.

@amosgyamfi
Created November 9, 2024 00:58
Show Gist options
  • Save amosgyamfi/8a841c354928ee8c66558067f05a1018 to your computer and use it in GitHub Desktop.
Save amosgyamfi/8a841c354928ee8c66558067f05a1018 to your computer and use it in GitHub Desktop.
from phi.agent import Agent
from phi.model.openai import OpenAIChat
from phi.tools.duckduckgo import DuckDuckGo
web_agent = Agent(
name="Web Agent",
model=OpenAIChat(id="gpt-4o-mini"),
tools=[DuckDuckGo()],
instructions=["Always include sources"],
show_tool_calls=True,
markdown=True,
)
web_agent.print_response("Whats happening in USA elections?", stream=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment