Schema
Provider rules are based on the Provider entity.
Model rules are based on the AIModelEntity entity.
All entities mentioned below are based on
Pydantic BaseModel
and can be found in theentities
module.
Provider
provider
(string) Provider identifier, e.g.,openai
label
(object) Provider display name, i18n, withen_US
English andzh_Hans
Chinese language settingszh_Hans
(string) [optional] Chinese label name, ifzh_Hans
is not set,en_US
will be used by default.en_US
(string) English label name
description
(object) Provider description, i18nzh_Hans
(string) [optional] Chinese descriptionen_US
(string) English description
icon_small
(string) [optional] Small provider ICON, stored in the_assets
directory under the corresponding provider implementation directory, with the same language strategy aslabel
zh_Hans
(string) Chinese ICONen_US
(string) English ICON
icon_large
(string) [optional] Large provider ICON, stored in the_assets
directory under the corresponding provider implementation directory, with the same language strategy aslabel
zh_Hans
(string) Chinese ICONen_US
(string) English ICON
background
(string) [optional] Background color value, e.g., #FFFFFF, if empty, the default frontend color value will be displayed.help
(object) [optional] help informationtitle
(object) help title, i18nzh_Hans
(string) [optional] Chinese titleen_US
(string) English title
url
(object) help link, i18nzh_Hans
(string) [optional] Chinese linken_US
(string) English link
supported_model_types
(array[ModelType]) Supported model typesconfigurate_methods
(array[ConfigurateMethod]) Configuration methodsprovider_credential_schema
(ProviderCredentialSchema) Provider credential specificationmodel_credential_schema
(ModelCredentialSchema) Model credential specification
AIModelEntity
model
(string) Model identifier, e.g.,gpt-3.5-turbo
label
(object) [optional] Model display name, i18n, withen_US
English andzh_Hans
Chinese language settingszh_Hans
(string) [optional] Chinese label nameen_US
(string) English label name
model_type
(ModelType) Model typefeatures
(array[ModelFeature]) [optional] Supported feature listmodel_properties
(object) Model propertiesmode
(LLMMode) Mode (available for model typellm
)context_size
(int) Context size (available for model typesllm
,text-embedding
)max_chunks
(int) Maximum number of chunks (available for model typestext-embedding
,moderation
)file_upload_limit
(int) Maximum file upload limit, in MB (available for model typespeech2text
)supported_file_extensions
(string) Supported file extension formats, e.g., mp3, mp4 (available for model typespeech2text
)default_voice
(string) default voice, e.g.:alloy,echo,fable,onyx,nova,shimmer(available for model typetts
)voices
(list) List of available voice.(available for model typetts
)mode
(string) voice model.(available for model typetts
)name
(string) voice model display name.(available for model typetts
)language
(string) the voice model supports languages.(available for model typetts
)
word_limit
(int) Single conversion word limit, paragraphwise by default(available for model typetts
)audio_type
(string) Support audio file extension format, e.g.:mp3,wav(available for model typetts
)max_workers
(int) Number of concurrent workers supporting text and audio conversion(available for model typetts
)max_characters_per_chunk
(int) Maximum characters per chunk (available for model typemoderation
)
parameter_rules
(array[ParameterRule]) [optional] Model invocation parameter rulespricing
(PriceConfig) [optional] Pricing informationdeprecated
(bool) Whether deprecated. If deprecated, the model will no longer be displayed in the list, but those already configured can continue to be used. Default False.
ModelType
llm
Text generation modeltext-embedding
Text Embedding modelrerank
Rerank modelspeech2text
Speech to texttts
Text to speechmoderation
Moderation
ConfigurateMethod
predefined-model
Predefined modelIndicates that users can use the predefined models under the provider by configuring the unified provider credentials.
customizable-model
Customizable modelUsers need to add credential configuration for each model.
fetch-from-remote
Fetch from remoteConsistent with the
predefined-model
configuration method, only unified provider credentials need to be configured, and models are obtained from the provider through credential information.
ModelFeature
agent-thought
Agent reasoning, generally over 70B with thought chain capability.vision
Vision, i.e., image understanding.tool-call
multi-tool-call
stream-tool-call
FetchFrom
predefined-model
Predefined modelfetch-from-remote
Remote model
LLMMode
completion
Text completionchat
Dialogue
ParameterRule
name
(string) Actual model invocation parameter nameuse_template
(string) [optional] Using templateBy default, 5 variable content configuration templates are preset:
temperature
top_p
frequency_penalty
presence_penalty
max_tokens
In use_template, you can directly set the template variable name, which will use the default configuration in entities.defaults.PARAMETER_RULE_TEMPLATE No need to set any parameters other than
name
anduse_template
. If additional configuration parameters are set, they will override the default configuration. Refer toopenai/llm/gpt-3.5-turbo.yaml
.label
(object) [optional] Label, i18nzh_Hans
(string) [optional] Chinese label nameen_US
(string) English label name
type
(string) [optional] Parameter typeint
Integerfloat
Floatstring
Stringboolean
Boolean
help
(string) [optional] Help informationzh_Hans
(string) [optional] Chinese help informationen_US
(string) English help information
required
(bool) Required, default False.default
(int/float/string/bool) [optional] Default valuemin
(int/float) [optional] Minimum value, applicable only to numeric typesmax
(int/float) [optional] Maximum value, applicable only to numeric typesprecision
(int) [optional] Precision, number of decimal places to keep, applicable only to numeric typesoptions
(array[string]) [optional] Dropdown option values, applicable only whentype
isstring
, if not set or null, option values are not restricted
PriceConfig
input
(float) Input price, i.e., Prompt priceoutput
(float) Output price, i.e., returned content priceunit
(float) Pricing unit, e.g., if the price is meausred in 1M tokens, the corresponding token amount for the unit price is0.000001
.currency
(string) Currency unit
ProviderCredentialSchema
credential_form_schemas
(array[CredentialFormSchema]) Credential form standard
ModelCredentialSchema
model
(object) Model identifier, variable name defaults tomodel
label
(object) Model form item display nameen_US
(string) Englishzh_Hans
(string) [optional] Chinese
placeholder
(object) Model prompt contenten_US
(string) Englishzh_Hans
(string) [optional] Chinese
credential_form_schemas
(array[CredentialFormSchema]) Credential form standard
CredentialFormSchema
variable
(string) Form item variable namelabel
(object) Form item label nameen_US
(string) Englishzh_Hans
(string) [optional] Chinese
type
(FormType) Form item typerequired
(bool) Whether requireddefault
(string) Default valueoptions
(array[FormOption]) Specific property of form items of typeselect
orradio
, defining dropdown contentplaceholder
(object) Specific property of form items of typetext-input
, placeholder contenten_US
(string) Englishzh_Hans
(string) [optional] Chinese
max_length
(int) Specific property of form items of typetext-input
, defining maximum input length, 0 for no limit.show_on
(array[FormShowOnObject]) Displayed when other form item values meet certain conditions, displayed always if empty.
FormType
text-input
Text input componentsecret-input
Password input componentselect
Single-choice dropdownradio
Radio componentswitch
Switch component, only supportstrue
andfalse
values
FormOption
label
(object) Labelen_US
(string) Englishzh_Hans
(string) [optional] Chinese
value
(string) Dropdown option valueshow_on
(array[FormShowOnObject]) Displayed when other form item values meet certain conditions, displayed always if empty.
FormShowOnObject
variable
(string) Variable name of other form itemsvalue
(string) Variable value of other form items
Last updated