https://github.com/gbaeke/smolagents_post
https://github.com/gbaeke/smolagents_post
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/gbaeke/smolagents_post
- Owner: gbaeke
- Created: 2025-01-26T17:02:35.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-01-26T22:27:14.000Z (3 months ago)
- Last Synced: 2025-02-04T13:54:26.424Z (3 months ago)
- Language: Python
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Smolagents and Azure OpenAI tutorial
## Setup
1. Clone the repository and navigate into the project directory
2. Install dependencies with: `pip install -r requirements.txt`
3. Create a `.env` file with your API keys:
- OPENAI_API_KEY=your_openai_key
- BING_SUBSCRIPTION_KEY=your_bing_key
4. For telemetry, run `python -m phoenix.server.main serve` before running the agent
- See https://huggingface.co/docs/smolagents/tutorials/inspect_runs for more information## Usage
Run the assistant by providing your question as a command-line argument:
```
python app.py "your question in quotes"
```Example commands:
- `python app.py "What is DeepSeek R1?"`
- `python app.py "Search for Python API tutorials"`## How it Works
The assistant uses three main components:
1. **CodeAgent**: Orchestrates the tools and processes natural language commands
2. **Tools**:
3. **LLM**: Uses GPT-4o to understand commands and generate responses## Requirements
- Python 3.8+
- Azure OpenAI API key and endpoint
- Bing API key