Team Ai
Apppublic

Underground-Digital/Workflow-Engine

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
schema.md207 linesDownload Raw Back to en_US
1# Configuration Rules2 3- Provider rules are based on the [Provider](#Provider) entity.4- Model rules are based on the [AIModelEntity](#AIModelEntity) entity.5 6> All entities mentioned below are based on `Pydantic BaseModel` and can be found in the `entities` module.7 8### Provider9 10- `provider` (string) Provider identifier, e.g., `openai`11- `label` (object) Provider display name, i18n, with `en_US` English and `zh_Hans` Chinese language settings12  - `zh_Hans` (string) [optional] Chinese label name, if `zh_Hans` is not set, `en_US` will be used by default.13  - `en_US` (string) English label name14- `description` (object) Provider description, i18n15  - `zh_Hans` (string) [optional] Chinese description16  - `en_US` (string) English description17- `icon_small` (string) [optional] Small provider ICON, stored in the `_assets` directory under the corresponding provider implementation directory, with the same language strategy as `label`18  - `zh_Hans` (string) Chinese ICON19  - `en_US` (string) English ICON20- `icon_large` (string) [optional] Large provider ICON, stored in the `_assets` directory under the corresponding provider implementation directory, with the same language strategy as `label`21  - `zh_Hans` (string) Chinese ICON22  - `en_US` (string) English ICON23- `background` (string) [optional] Background color value, e.g., #FFFFFF, if empty, the default frontend color value will be displayed.24- `help` (object) [optional] help information25  - `title` (object) help title, i18n26    - `zh_Hans` (string) [optional] Chinese title27    - `en_US` (string) English title28  - `url` (object) help link, i18n29    - `zh_Hans` (string) [optional] Chinese link30    - `en_US` (string) English link31- `supported_model_types` (array[[ModelType](#ModelType)]) Supported model types32- `configurate_methods` (array[[ConfigurateMethod](#ConfigurateMethod)]) Configuration methods33- `provider_credential_schema` ([ProviderCredentialSchema](#ProviderCredentialSchema)) Provider credential specification34- `model_credential_schema` ([ModelCredentialSchema](#ModelCredentialSchema)) Model credential specification35 36### AIModelEntity37 38- `model` (string) Model identifier, e.g., `gpt-3.5-turbo`39- `label` (object) [optional] Model display name, i18n, with `en_US` English and `zh_Hans` Chinese language settings40  - `zh_Hans` (string) [optional] Chinese label name41  - `en_US` (string) English label name42- `model_type` ([ModelType](#ModelType)) Model type43- `features` (array[[ModelFeature](#ModelFeature)]) [optional] Supported feature list44- `model_properties` (object) Model properties45  - `mode` ([LLMMode](#LLMMode)) Mode (available for model type `llm`)46  - `context_size` (int) Context size (available for model types `llm`, `text-embedding`)47  - `max_chunks` (int) Maximum number of chunks (available for model types `text-embedding`, `moderation`)48  - `file_upload_limit` (int) Maximum file upload limit, in MB (available for model type `speech2text`)49  - `supported_file_extensions` (string) Supported file extension formats, e.g., mp3, mp4 (available for model type `speech2text`)50  - `default_voice` (string)  default voice, e.g.:alloy,echo,fable,onyx,nova,shimmer(available for model type `tts`)51  - `voices` (list)  List of available voice.(available for model type `tts`)52    - `mode` (string)  voice model.(available for model type `tts`)53    - `name` (string)  voice model display name.(available for model type `tts`)54    - `language` (string)  the voice model supports languages.(available for model type `tts`)55  - `word_limit` (int)  Single conversion word limit, paragraph-wise by default(available for model type `tts`)56  - `audio_type` (string)  Support audio file extension format, e.g.:mp3,wav(available for model type `tts`)57  - `max_workers` (int)  Number of concurrent workers supporting text and audio conversion(available for model type`tts`)58  - `max_characters_per_chunk` (int) Maximum characters per chunk (available for model type `moderation`)59- `parameter_rules` (array[[ParameterRule](#ParameterRule)]) [optional] Model invocation parameter rules60- `pricing` ([PriceConfig](#PriceConfig)) [optional] Pricing information61- `deprecated` (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.62 63### ModelType64 65- `llm` Text generation model66- `text-embedding` Text Embedding model67- `rerank` Rerank model68- `speech2text` Speech to text69- `tts` Text to speech70- `moderation` Moderation71 72### ConfigurateMethod73 74- `predefined-model` Predefined model75 76  Indicates that users can use the predefined models under the provider by configuring the unified provider credentials.77- `customizable-model` Customizable model78 79  Users need to add credential configuration for each model.80 81- `fetch-from-remote` Fetch from remote82 83  Consistent with the `predefined-model` configuration method, only unified provider credentials need to be configured, and models are obtained from the provider through credential information.84 85### ModelFeature86 87- `agent-thought` Agent reasoning, generally over 70B with thought chain capability.88- `vision` Vision, i.e., image understanding.89- `tool-call`90- `multi-tool-call`91- `stream-tool-call`92 93### FetchFrom94 95- `predefined-model` Predefined model96- `fetch-from-remote` Remote model97 98### LLMMode99 100- `complete` Text completion101- `chat` Dialogue102 103### ParameterRule104 105- `name` (string) Actual model invocation parameter name106- `use_template` (string) [optional] Using template107 108  By default, 5 variable content configuration templates are preset:109 110  - `temperature`111  - `top_p`112  - `frequency_penalty`113  - `presence_penalty`114  - `max_tokens`115  116  In use_template, you can directly set the template variable name, which will use the default configuration in entities.defaults.PARAMETER_RULE_TEMPLATE117  No need to set any parameters other than `name` and `use_template`. If additional configuration parameters are set, they will override the default configuration.118  Refer to `openai/llm/gpt-3.5-turbo.yaml`.119 120- `label` (object) [optional] Label, i18n121 122  - `zh_Hans`(string) [optional] Chinese label name123  - `en_US` (string) English label name124 125- `type`(string) [optional] Parameter type126 127  - `int` Integer128  - `float` Float129  - `string` String130  - `boolean` Boolean131 132- `help` (string) [optional] Help information133 134  - `zh_Hans` (string) [optional] Chinese help information135  - `en_US` (string) English help information136 137- `required` (bool) Required, default False.138 139- `default`(int/float/string/bool) [optional] Default value140 141- `min`(int/float) [optional] Minimum value, applicable only to numeric types142 143- `max`(int/float) [optional] Maximum value, applicable only to numeric types144 145- `precision`(int) [optional] Precision, number of decimal places to keep, applicable only to numeric types146 147- `options` (array[string]) [optional] Dropdown option values, applicable only when `type` is `string`, if not set or null, option values are not restricted148 149### PriceConfig150 151- `input` (float) Input price, i.e., Prompt price152- `output` (float) Output price, i.e., returned content price153- `unit` (float) Pricing unit, e.g., if the price is measured in 1M tokens, the corresponding token amount for the unit price is `0.000001`.154- `currency` (string) Currency unit155 156### ProviderCredentialSchema157 158- `credential_form_schemas` (array[[CredentialFormSchema](#CredentialFormSchema)]) Credential form standard159 160### ModelCredentialSchema161 162- `model` (object) Model identifier, variable name defaults to `model`163  - `label` (object) Model form item display name164    - `en_US` (string) English165    - `zh_Hans`(string) [optional] Chinese166  - `placeholder` (object) Model prompt content167    - `en_US`(string) English168    - `zh_Hans`(string) [optional] Chinese169- `credential_form_schemas` (array[[CredentialFormSchema](#CredentialFormSchema)]) Credential form standard170 171### CredentialFormSchema172 173- `variable` (string) Form item variable name174- `label` (object) Form item label name175  - `en_US`(string) English176  - `zh_Hans` (string) [optional] Chinese177- `type` ([FormType](#FormType)) Form item type178- `required` (bool) Whether required179- `default`(string) Default value180- `options` (array[[FormOption](#FormOption)]) Specific property of form items of type `select` or `radio`, defining dropdown content181- `placeholder`(object) Specific property of form items of type `text-input`, placeholder content182  - `en_US`(string) English183  - `zh_Hans` (string) [optional] Chinese184- `max_length` (int) Specific property of form items of type `text-input`, defining maximum input length, 0 for no limit.185- `show_on` (array[[FormShowOnObject](#FormShowOnObject)]) Displayed when other form item values meet certain conditions, displayed always if empty.186 187### FormType188 189- `text-input` Text input component190- `secret-input` Password input component191- `select` Single-choice dropdown192- `radio` Radio component193- `switch` Switch component, only supports `true` and `false` values194 195### FormOption196 197- `label` (object) Label198  - `en_US`(string) English199  - `zh_Hans`(string) [optional] Chinese200- `value` (string) Dropdown option value201- `show_on` (array[[FormShowOnObject](#FormShowOnObject)]) Displayed when other form item values meet certain conditions, displayed always if empty.202 203### FormShowOnObject204 205- `variable` (string) Variable name of other form items206- `value` (string) Variable value of other form items207