Refactoring main
Aggiornato il file .env.example. Aggiunta la funzione available_keys() in app.py per controllare le chiavi API disponibili. Spostato example.py nelle demo. Rimosso requirements.txt.
This commit is contained in:
20
demos/example.py
Normal file
20
demos/example.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from agno.agent import Agent
|
||||
from agno.models.google import Gemini
|
||||
from agno.tools.reasoning import ReasoningTools
|
||||
from dotenv import load_dotenv
|
||||
|
||||
try:
|
||||
load_dotenv()
|
||||
|
||||
reasoning_agent = Agent(
|
||||
model=Gemini(),
|
||||
tools=[
|
||||
ReasoningTools(),
|
||||
],
|
||||
instructions="Use tables to display data.",
|
||||
markdown=True,
|
||||
)
|
||||
result = reasoning_agent.run("Scrivi una poesia su un gatto. Sii breve.")
|
||||
print(result.content)
|
||||
except Exception as e:
|
||||
print(f"Si è verificato un errore: {e}")
|
||||
Reference in New Issue
Block a user