إعداد مزود الذكاء الاصطناعي
Configure AI model providers through the Admin UI. Switch between local (Ollama) and cloud (Gemini, OpenAI, Anthropic, DeepSeek) providers without code changes.
الوصولing نماذج الذكاء الاصطناعي Settings
Navigate to Administration → AI Models.
Adding a Provider
Step 1 — Click "+ Add Model"
Step 2 — Select Provider
| Provider | Best For | Requires Internet |
|---|---|---|
| Ollama | On-prem, air-gapped, data-sensitive environments | ❌ |
| Gemini | Best overall quality and speed | ✅ |
| OpenAI | GPT-4o for complex reasoning | ✅ |
| Anthropic | Claude for long-context analysis | ✅ |
| DeepSeek | Cost-effective alternative | ✅ |
| Custom | Any OpenAI-compatible endpoint | Depends |
Step 3 — Configure
| Field | Required | Description |
|---|---|---|
| Name | ✅ | Display name (e.g., "Gemini Flash") |
| Provider | ✅ | Select from list |
| Model ID | ✅ | Model identifier (e.g., gemini-2.0-flash) |
| API URL | ✅ | Endpoint URL |
| API Key | Depends | Required for cloud providers |
| Type | ✅ | llm, reasoning, or embedding |
| System Prompt | Optional | Custom system instructions |
| Temperature | Optional | Creativity level (0.0 – 1.0) |
| Max Tokens | Optional | Maximum response length |
Step 4 — Test Connection
Click Test Connection to verify:
- ✅ API endpoint is reachable
- ✅ API key is valid (for cloud providers)
- ✅ Model responds to a test prompt
- ✅ Response time is acceptable
Step 5 — Save
Click Save. The provider is now available for use.
Provider-Specific Setup
Ollama (Local / On-Prem)
Provider: Ollama
API URL: http://localhost:11434
API Key: (leave empty)
Model ID: llama3.1:8b (or your preferred model)
No API key needed. Requires Ollama running locally with models downloaded.
Geدقيقةi
Provider: Gemini
API URL: https://generativelanguage.googleapis.com
API Key: (your Google AI Studio key)
Model ID: gemini-2.0-flash
مفتوحAI
Provider: OpenAI
API URL: https://api.openai.com/v1
API Key: (your OpenAI API key)
Model ID: gpt-4o
Anthropic
Provider: Anthropic
API URL: https://api.anthropic.com
API Key: (your Anthropic API key)
Model ID: claude-sonnet-4-20250514
Security
- API keys are encrypted at rest using AES-256-GCM
- Keys are encrypted using the
SECRET_ENCRYPTION_KEYenvironment variable - After saving, keys are displayed as
•••••{last 4 chars}— never shown in full - Keys are transmitted over TLS only
- Key rotation: delete and re-add the provider with a new key
Switching افتراضي Provider
- Navigate to Administration → AI Models
- Click the ⭐ icon next to the desired provider
- The selected provider becomes the default for all AI operations
- No code changes needed — routing is automatic
On-Prem / Air-Gapped النشر والتوزيع
For environments without internet access:
- Install Ollama on a local server
- Download models offline:
ollama pull llama3.1:8b - Configure AIIA to point to the local Ollama instance
- All AI features work without internet connectivity