|
| 1 | +--- |
| 2 | +title: Configuring AI Server |
| 3 | +--- |
| 4 | + |
| 5 | +# Configuring AI Server |
| 6 | + |
| 7 | +AI Server makes orchestration of various AI providers easy by providing a unified gateway to process LLM, AI, and image transformation requests. |
| 8 | +It comes with an Admin Dashboard that allows you to configure your AI providers and generate API keys to control access. |
| 9 | + |
| 10 | +## Accessing the Admin Dashboard |
| 11 | + |
| 12 | +Running AI Server will land you on a page showing access to: |
| 13 | + |
| 14 | +- **[Admin Dashboard](http://localhost:5005/admin)**: Centralized management of AI providers and API keys. |
| 15 | +- **[Admin UI](http://localhost:5005/admin-ui**: ServiceStack built in Admin UI to manage your AI Server. |
| 16 | +- **[API Explorer](http://localhost:5005/ui**: Explore and test the AI Server API endpoints in a friendly UI. |
| 17 | +- **[AI Server Documentation](https://docs.servicestack.net/ai-server/)**: Detailed documentation on how to use AI Server. |
| 18 | + |
| 19 | +## Configuring AI Providers |
| 20 | + |
| 21 | +AI Providers are the external LLM based services like OpenAI, Google, Mistral etc that AI Server interacts with to process Chat requests. |
| 22 | + |
| 23 | +There are two ways to configure AI Providers: |
| 24 | + |
| 25 | +1. **.env File**: Update the `.env` file with your API keys and run the AI Server for the first time. |
| 26 | +2. **Admin Dashboard**: Use the Admin Dashboard to add, edit, or remove AI Providers and generate AI Server API keys. |
| 27 | + |
| 28 | +### Using the .env File |
| 29 | + |
| 30 | +The `.env` file is used to configure AI Providers during the initial setup of AI Server, and is the easiest way to get started. |
| 31 | + |
| 32 | +The .env file is located in the root of the AI Server repository and contains the following keys: |
| 33 | + |
| 34 | +- **OPENAI_API_KEY**: OpenAI API Key |
| 35 | +- **GOOGLE_API_KEY**: Google Cloud API Key |
| 36 | +- **OPENROUTER_API_KEY**: OpenRouter API Key |
| 37 | +- **MISTRAL_API_KEY**: Mistral API Key |
| 38 | +- **GROQ_API_KEY**: GROQ API Key |
| 39 | + |
| 40 | +Providing the API keys in the .env file will automatically configure the AI Providers when you run the AI Server for the first time. |
| 41 | + |
| 42 | +### Using the Admin Dashboard |
| 43 | + |
| 44 | +The Admin Dashboard provides a more interactive way to manage your AI Providers after the AI Server is running. |
| 45 | + |
| 46 | +To access the Admin Dashboard: |
| 47 | + |
| 48 | +1. Navigate to [http://localhost:5005/admin](http://localhost:5005/admin). |
| 49 | +2. Log in with the default credentials `p@55wOrd`. |
| 50 | +3. Click on the **AI Providers** tab to view and manage your AI Providers. |
| 51 | + |
| 52 | +Here you can add, edit, or remove AI Providers, as well as generate API keys for each provider. |
| 53 | + |
| 54 | +AI Server supports the following AI Providers: |
| 55 | + |
| 56 | +- **OpenAI**: OpenAI Chat API |
| 57 | +- **Google**: Google Cloud AI |
| 58 | +- **OpenRouter**: OpenRouter API |
| 59 | +- **Mistral**: Mistral API |
| 60 | +- **GROQ**: GROQ API |
| 61 | +- **Ollama**: Ollama API |
| 62 | + |
| 63 | +## Generating AI Server API Keys |
| 64 | + |
| 65 | +API keys are used to authenticate requests to AI Server and are generated via the Admin Dashboard. |
| 66 | + |
| 67 | +Here you can create new API keys, view existing keys, and revoke keys as needed. |
| 68 | + |
| 69 | +Keys can be created with expiration dates, and restrictions to specific API endpoints, along with notes to help identify the key's purpose. |
| 70 | + |
| 71 | + |
0 commit comments