finish baidu ai model api implementation

This commit is contained in:
RockYang
2023-10-11 14:21:16 +08:00
parent 4fc01f3f7b
commit ba206bb387
9 changed files with 171 additions and 62 deletions

View File

@@ -47,7 +47,7 @@
<el-form :model="item" label-width="120px" ref="formRef" :rules="rules">
<el-form-item label="所属平台" prop="platform">
<el-select v-model="item.platform" placeholder="请选择平台">
<el-option v-for="item in platforms" :value="item" :key="item">{{ item }}</el-option>
<el-option v-for="item in platforms" :value="item.value" :key="item.value">{{ item.name }}</el-option>
</el-select>
</el-form-item>
@@ -94,7 +94,12 @@ const rules = reactive({
})
const loading = ref(true)
const formRef = ref(null)
const platforms = ref(["Azure", "OpenAI", "ChatGLM"])
const platforms = ref([
{name: "清华智普ChatGLM", value: "ChatGLM"},
{name: "百度文心一言", value: "Baidu"},
{name: "微软Azure", value: "Azure"},
{name: "OpenAIChatGPT", value: "OpenAI"},
])
// 获取数据
httpGet('/api/admin/model/list').then((res) => {