Create an LLM
POST/v2/llms
Create a new LLM for use with query and chat endpoints
Request
Header Parameters
Possible values: >= 1
The API will make a best effort to complete the request in the specified seconds or time out.
Possible values: >= 1
The API will make a best effort to complete the request in the specified milliseconds or time out.
- application/json
Body
- CreateOpenAILLMRequest
- BearerAuth
- HeaderAuth
Default value: openai-compatible
Must be "openai-compatible" for OpenAI and OpenAI-compatible APIs (like Anthropic Claude, Azure OpenAI, etc)
Name to reference the LLM. This will be used in other endpoints (like query) when using this LLM. If this name conflicts with a global LLM (a LLM that is precofnigured with the Vectara platform), then it will override that LLM for all usages.
Description of the LLM.
The model name to use with the API (e.g. gpt-4, claude-2, etc). This is used in the API request to the remote LLM provider.
The URI endpoint for the API (can be OpenAI or any compatible API endpoint)
auth object
Authentication configuration for an LLM
Default value: bearer
Must be "bearer" for bearer token auth
The bearer token to use for authentication
Default value: header
Must be "header" for header-based auth
The header name to use (e.g. x-api-key)
The header value to use
test_model_parameters object
Any additional parameters that are required for the LLM during the test call.
Any additional parameters that are required for the LLM during the test call.
Responses
- 201
- 400
- 403
The LLM has been created
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
Possible values: Value must match regular expression llm_.*
The ID of the LLM.
Name of the LLM.
The description of the LLM.
Indicates whether the LLM is enabled.
If this is the default LLM, it is used in queries when the generator is not specified.
prompts object[]deprecated
List of prompts that the model can use. This is deprecated; see /v2/generation_presets
instead.
Possible values: Value must match regular expression pmt_.*
The ID of the prompt.
Name of the prompt. This is used as the prompt_name
in a query.
The description of the prompt.
Indicates whether the prompt is enabled.
Indicates if this prompt is the default prompt used with the LLM.
{
"id": "string",
"name": "string",
"description": "string",
"enabled": true,
"default": true
}
Invalid request body
- application/json
- Schema
- Example (from schema)
Schema
field_errors object
The errors that relate to specific fields in the request.
The ID of the request that can be used to help Vectara support debug what went wrong.
{
"field_errors": {},
"messages": [
"string"
],
"request_id": "string"
}
Permissions do not allow creating an LLM
- application/json
- Schema
- Example (from schema)
Schema
The messages describing why the error occurred.
The ID of the request that can be used to help Vectara support debug what went wrong.
{
"messages": [
"Internal server error."
],
"request_id": "string"
}