provider_model_record model_credentials初始化问题

This commit is contained in:
glide-the 2024-06-12 14:14:26 +08:00
parent 10c43e87ac
commit 9bfdc6febb
4 changed files with 2 additions and 45 deletions

View File

@ -1,43 +0,0 @@
model: chatglm3-6b
label:
zh_Hans: chatglm3-6b
en_US: chatglm3-6b
model_type: llm
features:
- multi-tool-call
- agent-thought
- stream-tool-call
model_properties:
mode: chat
context_size: 4096
parameter_rules:
- name: temperature
use_template: temperature
- name: top_p
use_template: top_p
- name: presence_penalty
use_template: presence_penalty
- name: frequency_penalty
use_template: frequency_penalty
- name: max_tokens
use_template: max_tokens
default: 512
min: 1
max: 4096
- name: response_format
label:
zh_Hans: 回复格式
en_US: response_format
type: string
help:
zh_Hans: 指定模型必须输出的格式
en_US: specifying the format that the model must output
required: false
options:
- text
- json_object
pricing:
input: '0.001'
output: '0.002'
unit: '0.001'
currency: USD

View File

@ -239,7 +239,7 @@ class ProviderManager:
if not provider_model_record.get("model_credentials"):
continue
provider_model_credentials = {}
provider_model_credentials = provider_model_record.get("model_credentials")
for variable in model_credential_variables:
if variable in provider_model_record.get("model_credentials"):
try:

View File

@ -6,6 +6,7 @@ xinference:
model_credentials:
server_url: 'http://127.0.0.1:9997/'
model_uid: 'chatglm3-6b'
completion_type: 'chat'
- model: 'bge-m3'
model_type: 'embeddings'
completion_type: 'embeddings'