extract code for saving chat history

This commit is contained in:
RockYang
2024-05-22 15:32:44 +08:00
parent 6944a32ff3
commit 4bba77ab47
18 changed files with 261 additions and 717 deletions

View File

@@ -214,15 +214,7 @@ const rules = reactive({
})
const loading = ref(true)
const formRef = ref(null)
const platforms = ref([
{name: "OpenAIChatGPT", value: "OpenAI"},
{name: "讯飞星火大模型", value: "XunFei"},
{name: "清华智普ChatGLM", value: "ChatGLM"},
{name: "百度文心一言", value: "Baidu"},
{name: "微软Azure", value: "Azure"},
{name: "阿里通义千问", value: "QWen"},
])
const platforms = ref([])
// 获取 API KEY
const apiKeys = ref([])
@@ -287,6 +279,12 @@ onMounted(() => {
clipboard.value.on('error', () => {
ElMessage.error('复制失败!');
})
httpGet("/api/admin/config/get/app").then(res => {
platforms.value = res.data.platforms
}).catch(e =>{
ElMessage.error("获取配置失败"+e.message)
})
})
onUnmounted(() => {