- Model provider rules are based on the Provider entity.
- Model rules are based on the AIModelEntity entity.
All entities below are based onPydantic BaseModel, and can be found in theentitiesmodule.
Provider
Provider identifier, e.g.:
openaiBackground color value, e.g.: #FFFFFF, if empty, will display the frontend default color value
Supported model types
Configuration methods
Provider credential specifications
Model credential specifications
AIModelEntity
Model identifier, e.g.:
gpt-3.5-turboModel 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)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
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.
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 restrictedPriceConfig
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.000001Currency unit
ProviderCredentialSchema
Credential form specifications
ModelCredentialSchema
Credential form specifications
CredentialFormSchema
Form item variable name
Form item type
Whether required
Default value
Form item attribute specific to
select or radio, defines dropdown contentForm item attribute specific to
text-input, defines maximum input length, 0 means no limitDisplay 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 falseFormOption
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
Edit this page | Report an issue