tmp #99

Merged
李寻欢 merged 51 commits from tmp into hotfix 2024-08-20 16:45:07 +08:00
3 changed files with 7 additions and 3 deletions
Showing only changes of commit 0f092977ba - Show all commits

View File

@ -102,6 +102,7 @@ ai:
models:
- name: ChatGPT-4
model: gpt-4
canManager: false
- name: 讯飞星火v3.1
model: SparkDesk-v3.1
- name: 讯飞星火v3.5
@ -116,8 +117,10 @@ ai:
model: StepChat
- name: 豆包Lite-4k
model: Doubao-lite-4k
canManager: true
- name: 豆包Pro-4k
model: Doubao-pro-4k
canManager: true
# 资源配置
# map[k]v结构k 会变成全小写,所以这儿不能用大写字母

View File

@ -15,6 +15,7 @@ type ai struct {
// aiModel
// @description: AI模型
type aiModel struct {
Name string `json:"name" yaml:"name"` // 模型名称
Model string `json:"dto" yaml:"dto"` // 模型代码
Name string `json:"name" yaml:"name"` // 模型名称
Model string `json:"dto" yaml:"dto"` // 模型代码
CanManager bool `json:"canManager" yaml:"canManager"` // 是否可以在manager页面中选择
}

View File

@ -53,7 +53,7 @@
<select class="block w-full rounded-md border-0 py-1.5 pl-3 pr-10 text-gray-900 ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-green-600 sm:text-sm sm:leading-6" onchange="aiModelChange(event, {{.info.Wxid}})">
{{$useModel := .info.AiModel}}
{{ range $.aiModels }}
<option value="{{.Model}}" {{ if eq $useModel .Model}}selected{{ end }}>
<option value="{{.Model}}" {{ if eq $useModel .Model}}selected{{ end }} {{ if not .CanManager}}disabled{{ end }}>
{{.Name}}
</option>
{{ end }}