Model Specs¶
- Model provider rules are based on the Provider entity.
- Model rules are based on the AIModelEntity entity.
All entities below are based on
Pydantic BaseModel, and can be found in theentitiesmodule.
Provider¶
Provider identifier, e.g.: openai
Provider display name, i18n, can set both en_US (English) and zh_Hans (Chinese) languages
Chinese label, if not set, will default to using `en_US`
English label
Provider description, i18n
Chinese description
English description
Provider small icon, stored in the _assets directory under the corresponding provider implementation directory
Chinese icon
English icon
Provider large icon, stored in the _assets directory under the corresponding provider implementation directory
Chinese icon
English icon
Background color value, e.g.: #FFFFFF, if empty, will display the frontend default color value
Help information
Help title, i18n
Chinese title
English title
Help link, i18n
Chinese link
English link
Supported model types
Configuration methods
Provider credential specifications
Model credential specifications
AIModelEntity¶
Model identifier, e.g.: gpt-3.5-turbo
Model display name, i18n, can set both en_US (English) and zh_Hans (Chinese) languages
Chinese label
English label
Model type
List of supported features
Model properties
Mode (available for model type `llm`)
Context size (available for model types `llm` and `text-embedding`)
Maximum number of chunks (available for model types `text-embedding` and `moderation`)
Maximum file upload limit, unit: MB. (available for model type `speech2text`)
Supported file extension formats, e.g.: mp3,mp4 (available for model type `speech2text`)
Default voice, required: alloy,echo,fable,onyx,nova,shimmer (available for model type `tts`)
List of available voices (available for model type `tts`)
Voice model
Voice model display name
Supported languages for voice model
Word limit for single conversion, defaults to paragraph segmentation (available for model type `tts`)
Supported audio file extension formats, e.g.: mp3,wav (available for model type `tts`)
Number of concurrent tasks supported for text-to-audio conversion (available for model type `tts`)
Maximum characters per chunk (available for model type `moderation`)
Model call parameter rules
Pricing information
Whether deprecated. If deprecated, the model list will no longer display it, but those already configured can continue to be used. Default is False.
ModelType¶
Text generation model
Text embedding model
Rerank model
Speech to text
Text to speech
Content moderation
ConfigurateMethod¶
Predefined model - Indicates that the user only needs to configure unified provider credentials to use predefined models under the provider.
Customizable model - The user needs to add credential configuration for each model.
Fetch from remote - Similar to the predefined-model configuration method, only unified provider credentials are needed, but the models are fetched from the provider using the credential information.
ModelFeature¶
Agent reasoning, generally models over 70B have chain-of-thought capabilities.
Vision, i.e.: image understanding.
Tool calling
Multiple tool calling
Streaming tool calling
FetchFrom¶
Predefined model
Remote model
LLMMode¶
Text completion
Chat
ParameterRule¶
Actual parameter name for model call
Use template
For details on using templates, you can refer to the examples in Creating a New Model Provider.
There are 5 pre-configured variable content templates by default:
temperaturetop_pfrequency_penaltypresence_penaltymax_tokens
You can directly set the template variable name in use_template, which will use the default configuration from entities.defaults.PARAMETER_RULE_TEMPLATE without needing to set any parameters other than name and use_template. If additional configuration parameters are set, they will override the default configuration. You can refer to openai/llm/gpt-3.5-turbo.yaml for examples.
Label, i18n
Chinese label
English label
Parameter type
Integer
Floating point
String
Boolean
Help information
Chinese help information
English help information
Whether required, default is False
Default value
Minimum value, only applicable to numeric types
Maximum value, only applicable to numeric types
Precision, decimal places to retain, only applicable to numeric types
Dropdown option values, only applicable when type is string, if not set or is null, then option values are not restricted
PriceConfig¶
Input unit price, i.e., Prompt unit price
Output unit price, i.e., returned content unit price
Price unit, e.g., if priced per 1M tokens, then the unit token number corresponding to the unit price is 0.000001
Currency unit
ProviderCredentialSchema¶
Credential form specifications
ModelCredentialSchema¶
Model identifier, default variable name is model
Model form item display name
English
Chinese
Model prompt content
English
Chinese
Credential form specifications
CredentialFormSchema¶
Form item variable name
Form item label
English
Chinese
Form item type
Whether required
Default value
Form item attribute specific to select or radio, defines dropdown content
Form item attribute specific to text-input, form item placeholder
English
Chinese
Form item attribute specific to text-input, defines maximum input length, 0 means no limit
Display when other form item values meet conditions, empty means always display
FormType¶
Text input component
Password input component
Single-select dropdown
Radio component
Switch component, only supports true and false
FormOption¶
Label
English
Chinese
Dropdown option value
Display when other form item values meet conditions, empty means always display
FormShowOnObject¶
Other form item variable name
Other form item variable value
Related Resources¶
- Model Architecture Details - Deep dive into the architecture specifications of model plugins
- Quickly Integrate a New Model - Learn how to apply these rules to add new models
- General Specifications - Understand the configuration of plugin manifest files
- Create a New Model Provider - Develop brand new model provider plugins
{/ Contributing Section DO NOT edit this section! It will be automatically generated by the script. /}