github-sync-test / test /smol_agent.py
billyaungmyint's picture
Sync from GitHub via hub-sync
5ae3265 verified
raw
history blame contribute delete
429 Bytes
from smolagents import CodeAgent, LiteLLMModel
import os
# Using LiteLLMModel is the safest bet for Google/GitHub/HuggingFace
# because it handles the API translation for you.
model = LiteLLMModel(
model_id="gemini/gemini-2.5-flash", # Let's use Gemini to avoid those GitHub HTML errors
api_key=os.getenv("GOOGLE_API_KEY")
)
agent = CodeAgent(tools=[], model=model)
print(agent.run("Success check: Are you online?"))