Your server must expose an endpoint compatible with the OpenAI Chat Completions API. For best results, it should also support streaming completions.
Step 1 (optional): If your server requires authentication, register credentials via the /credential endpoint:
{
"provider": "custom-llm",
"apiKey": "<YOUR SERVER API KEY>"
}
If your server is not authenticated, you can skip this step.
Step 2: Create an assistant with the custom-llm provider:
{
"name": "My Assistant",
"model": {
"provider": "custom-llm",
"url": "<YOUR OPENAI COMPATIBLE ENDPOINT BASE URL>",
"model": "my-cool-model",
"messages": [
{
"role": "system",
"content": "You are an assistant."
}
],
"temperature": 0.7
}
}