Spaces:
Running
Running
| 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?")) | |