This guide will walk you through the process of connecting external Large Language Models (LLMs) and embedding models to the platform. This allows you to use your own AI models or third-party services instead of the default models.
Who should follow this guide: Platform administrators who want to configure custom AI models.
What you'll need:
- Admin access to the platform
- API credentials from your chosen AI service provider (e.g., OpenAI API key)
- The API endpoint URL for your model
Large Language Models are the AI "brains" that power conversations with your agents. Follow these steps to connect your own LLM.
- Open the platform in your web browser
- Enter your login credentials:
- Username:
adminor your admin username - Password: The admin password you set during deployment
- Username:
- Click the Log in button
- Once logged in, look at the left sidebar
- Find the sub-section Settings
- In the Settings sub-section, click on General (represented by a gear icon ⚙️)
- You'll see several tabs at the top - click on the LLM tab
- Click the Create LLM button
You should now see a form where you can configure a new language model.
In the Vendor dropdown menu, select the service provider you want to use. Common options include:
- ChatOpenAI: For OpenAI models or any service with an OpenAI-compatible API
- Anthropic: For Claude models
- Google: For Gemini models
- Other vendors: Depending on your platform configuration
Most common choice: Select ChatOpenAI if you're using:
- Official OpenAI models (GPT-4, GPT-3.5, etc.)
- Local models served via tools like Ollama, LM Studio, or vLLM
- Third-party services with OpenAI-compatible APIs
In the Specifications field, you need to provide configuration details in YAML format. YAML is a simple text format that uses indentation and colons to organize information.
Important: Pay attention to spacing and indentation - YAML is sensitive to this!
api_key: test
base_url: http://localhost:11434/v1
model: hf.co/BSC-LT/salamandra-7b-instruct-tools:Q8_0Explanation of each field:
-
api_key: Your API authentication key- For OpenAI: Get this from https://platform.openai.com/api-keys
- For local models: Often just
testor any placeholder text
-
base_url: The API endpoint URL- For OpenAI:
https://api.openai.com/v1 - For local models (Ollama):
http://localhost:11434/v1 - For other services: Check their documentation
- For OpenAI:
-
model: The specific model identifier- For OpenAI:
gpt-4,gpt-4-turbo,gpt-3.5-turbo, etc. - For local models: The model name as it appears in your local service
- Example:
hf.co/BSC-LT/salamandra-7b-instruct-tools:Q8_0
- For OpenAI:
Using Official OpenAI:
api_key: sk-proj-abc123xyz456...
base_url: https://api.openai.com/v1
model: gpt-4-turboUsing a Local Model with Ollama:
api_key: test
base_url: http://localhost:11434/v1
model: llama3Below the specifications field, you'll see a table showing all available parameters for your selected vendor. Common parameters include:
max_retries: Maximum number of times to retry if the API request fails (Optional)max_tokens: Maximum length of the response in tokens (Optional)model: The model identifier (Required - type: string)n: Number of completions to generate for each prompt (Optional - type: integer)temperature: Controls randomness (0 = focused, 1 = creative) (Optional)timeout: Maximum time to wait for a response (Optional)
Tip: You only need to include the parameters you want to customize. The required ones are typically just api_key, base_url, and model.
In the Name field at the top of the form, enter a unique name for this model configuration.
Guidelines:
- Use a descriptive name that helps you identify the model later
- Examples:
gpt-4-production,local-llama3,claude-opus - The name must be unique (no two models can have the same name)
- Look for the Default checkbox
- Check this box if you want this model to be used automatically when creating new agents
What does "Default" mean?
- When you create a new agent, this model will be pre-selected
- You can still choose different models for individual agents later
- Only one model can be set as default at a time
-
Double-check all your entries:
- Name is filled in and unique
- Vendor is selected correctly
- Specifications are in valid YAML format (correct indentation and colons)
- Default is checked if desired
-
Click the Submit button at the bottom of the form
-
You should see a success message confirming the model has been added
What happens next?
- Your new model is now available in the platform
- When changing agent configuration, you can select this model from the dropdown
- If you set it as default, it will be automatically selected for new agents
Embedding models convert text into numerical representations, which is essential for the RAG (Retrieval-Augmented Generation) functionality. This allows agents to search through documents and find relevant information.
Follow similar steps to add an embedding model:
- From the Settings → General page
- Click on the Embeddings tab (instead of LLM)
- Click the Create Embedding button
Follow the same process as with LLMs:
-
Name: Give your embedding model a unique name (e.g.,
openai-embeddings,local-embeddings) -
Vendor: Choose your embedding provider
- Common options: OpenAI, HuggingFace, Cohere, or custom providers
-
Specifications: Enter the configuration in YAML format
api_key: sk-proj-abc123xyz456...
base_url: https://api.openai.com/v1
model: text-embedding-3-smallapi_key: test
base_url: http://localhost:11434/v1
model: nomic-embed-text-
Default: Check this box to make it the default embedding model
-
Submit: Click the Submit button
Problem: Your specifications aren't formatted correctly
Solution:
- Check that each line follows the pattern:
key: value - Ensure there are no tabs (use spaces only)
- Make sure colons (
:) have a space after them - Verify indentation is consistent
- Don't use special characters in values without quotes
Example of incorrect YAML:
api_key:test ❌ (missing space after colon)
base_url :http://localhost ❌ (space before colon)
model: gpt-4 ❌ (using tabs instead of spaces)Example of correct YAML:
api_key: test ✅
base_url: http://localhost ✅
model: gpt-4 ✅Problem: You're trying to use a name that's already taken
Solution:
- Choose a different name for your model
- Or delete/rename the existing model with that name first
Problem: The model is configured but doesn't respond to queries
Solutions:
- Check API Key: Verify your API key is correct and active
- Verify Base URL: Ensure the URL is reachable
- For local models: Make sure the local service is running
- Test the URL in your browser or with
curl
- Check Model Name: Confirm the model identifier matches exactly what the API expects
- Review Logs: Check the backend logs for error messages
- Test API Directly: Try calling the API endpoint directly to ensure it's working
Problem: Requests to the model are timing out
Solutions:
- For local models: Ensure the local service is running and accessible
- For cloud APIs: Check your internet connection
- Add a
timeoutparameter to your specifications with a higher value:api_key: your-key base_url: https://api.example.com model: model-name timeout: 60
- OpenAI: https://platform.openai.com/docs/api-reference/introduction
- Anthropic (Claude): https://docs.anthropic.com/
- Google (Gemini): https://ai.google.dev/docs
- Ollama (Local Models): https://ollama.com/
- OpenAI: Sign up at https://platform.openai.com/ and create an API key
- Anthropic: Register at https://www.anthropic.com/
- Google: Use Google Cloud Console for Gemini API access
- Learn YAML: https://yaml.org/
- YAML Validator: Use online tools like https://www.yamllint.com/ to check your YAML syntax
Before you finish, make sure you've completed these steps:
- Logged in as admin user
- Navigated to Settings → General → LLM → Create LLM
- Selected the appropriate vendor
- Entered valid specifications in YAML format
- Given the model a unique, descriptive name
- Set as default (if desired)
- Clicked Submit successfully
- Tested the model by creating/using an agent
- (Optional) Repeated the process for embedding models
If you encounter issues not covered in this guide:
- Check the backend logs for detailed error messages
- Verify your API provider's status page for outages
- Consult your AI service provider's documentation
- Refer to the platform's main documentation