mirror of
https://github.com/Shubhamsaboo/awesome-llm-apps.git
synced 2026-05-01 16:22:37 -05:00
19 lines
624 B
Python
19 lines
624 B
Python
from phi.agent import Agent
|
|
from phi.model.openai import OpenAIChat
|
|
from phi.cli.console import console
|
|
|
|
regular_agent = Agent(model=OpenAIChat(id="gpt-4o-mini"), markdown=True)
|
|
|
|
reasoning_agent = Agent(
|
|
model=OpenAIChat(id="gpt-4o"),
|
|
reasoning=True,
|
|
markdown=True,
|
|
structured_outputs=True,
|
|
)
|
|
|
|
task = "How many 'r' are in the word 'supercalifragilisticexpialidocious'?"
|
|
|
|
console.rule("[bold green]Regular Agent[/bold green]")
|
|
regular_agent.print_response(task, stream=True)
|
|
console.rule("[bold yellow]Reasoning Agent[/bold yellow]")
|
|
reasoning_agent.print_response(task, stream=True, show_full_reasoning=True) |