Predefined Model Integration
Preparing the Model YAML
model: claude-2.1 # Model identifier
# Model display name, can be set in en_US English and zh_Hans Chinese. If zh_Hans is not set, it will default to en_US.
# You can also not set a label, in which case the model identifier will be used.
label:
en_US: claude-2.1
model_type: llm # Model type, claude-2.1 is an LLM
features: # Supported features, agent-thought supports Agent reasoning, vision supports image understanding
- agent-thought
model_properties: # Model properties
mode: chat # LLM mode, complete for text completion model, chat for dialogue model
context_size: 200000 # Maximum context size supported
parameter_rules: # Model invocation parameter rules, only LLM needs to provide
- name: temperature # Invocation parameter variable name
# There are 5 preset variable content configuration templates: temperature/top_p/max_tokens/presence_penalty/frequency_penalty
# You can set the template variable name directly in use_template, and it will use the default configuration in entities.defaults.PARAMETER_RULE_TEMPLATE
# If additional configuration parameters are set, they will override the default configuration
use_template: temperature
- name: top_p
use_template: top_p
- name: top_k
label: # Invocation parameter display name
zh_Hans: 取样数量
en_US: Top k
type: int # Parameter type, supports float/int/string/boolean
help: # Help information, describes the parameter's function
zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
en_US: Only sample from the top K options for each subsequent token.
required: false # Whether it is required, can be omitted
- name: max_tokens_to_sample
use_template: max_tokens
default: 4096 # Default parameter value
min: 1 # Minimum parameter value, only applicable to float/int
max: 4096 # Maximum parameter value, only applicable to float/int
pricing: # Pricing information
input: '8.00' # Input unit price, i.e., Prompt unit price
output: '24.00' # Output unit price, i.e., return content unit price
unit: '0.000001' # Price unit, the above price is per 100K
currency: USD # Price currencyImplementing Model Invocation Code
Last updated