Skip to content

Commit c890673

Browse files
authored
(feat) Direct OpenAI Support (#34)
* direct support of openai * reasoning support, reasoning effort added * removed unneeded comments * updated error on missing keys * added openai api key env var in docker-compose * support for reasoning token usage * moved max tokens and temp back to optional * fixed tests * updated readme to describe providers and keys
1 parent a890f2a commit c890673

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1357
-1203
lines changed

README.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,17 @@ Our mission is to make prompt crafting dynamic, prompt management safe, and prom
5555
- **OpenAI Compatible API**: Use with existing OpenAI client libraries
5656
- **Provider Integration**: Support for multiple LLM providers with a unified API
5757

58+
## Supported Providers
59+
60+
Llmkit supports the following LLM providers:
61+
62+
- **OpenRouter**: Access to 100+ models through a unified API
63+
- **OpenAI**: Direct integration with OpenAI's GPT models
64+
- **Anthropic**: Claude models (coming soon)
65+
- **Azure OpenAI**: Microsoft's Azure-hosted OpenAI models (coming soon)
66+
- **Google Gemini**: Google's Gemini models (coming soon)
67+
- **DeepSeek**: DeepSeek's models (coming soon)
68+
5869
## How It Works
5970

6071
### Prompt Architecture
@@ -180,7 +191,9 @@ Every LLM call has a detailed trace that you can view. directly in the llmkit UI
180191
### Required
181192

182193
- **Rust Toolchain**: Latest stable version of Rust and Cargo
183-
- **OpenRouter API Key**: You must have an OpenRouter API key to use Llmkit
194+
- **API Keys**: You need API keys for the providers you want to use:
195+
- **OpenRouter**: Required if using OpenRouter provider
196+
- **OpenAI**: Required if using OpenAI or OpenRouter provider (set via `OPENAI_API_KEY`)
184197
- **SQLite**: For database functionality
185198

186199
### Optional Dependencies
@@ -209,11 +222,14 @@ cp .env.example .env
209222
3. Edit the `.env` file with your API keys and a secure JWT secret:
210223
```bash
211224
# Required
212-
OPENROUTER_API_KEY=your_openrouter_key_here
213225
JWT_SECRET=your_secure_random_string
214226
DATABASE_URL=sqlite:/app/data/llmkit.db
215227
API_BASE_URL=http://backend:8000
216228
USE_SECURE_COOKIE=false # Set to true for HTTPS deployments
229+
230+
# Provider API Keys (add the ones you need)
231+
OPENROUTER_API_KEY=your_openrouter_key_here
232+
OPENAI_API_KEY=your_openai_key_here # Required for OpenAI and OpenRouter providers
217233
```
218234

219235
4. Build and start the containers:
@@ -234,15 +250,20 @@ If you prefer to set things up manually, follow these steps:
234250
cp .env.example backend/.env
235251
```
236252

237-
2. Edit the `.env` file with your OpenRouter API key and other settings:
253+
2. Edit the `.env` file with your API keys and other settings:
238254
```bash
239255
RUST_LOG=info
240256
DATABASE_URL="sqlite:absolute/path/to/backend/llmkit.db"
241-
OPENROUTER_API_KEY=your_openrouter_key_here
242257
JWT_SECRET=your_secure_random_string
243258
USE_SECURE_COOKIE=false # Set to true for HTTPS deployments
259+
260+
# Provider API Keys (add the ones you need)
261+
OPENROUTER_API_KEY=your_openrouter_key_here
262+
OPENAI_API_KEY=your_openai_key_here # Required for OpenAI and OpenRouter providers
244263
```
245264

265+
**Note**: If you don't set the required API keys for a provider, the backend will fail when you try to use that provider.
266+
246267
3. Start the server:
247268
```bash
248269
cd backend

0 commit comments

Comments
 (0)