Commit 4e37ed14 authored by linpeiqin's avatar linpeiqin

修改相关名词

parent 43074339
module.exports = {
baseUrl: 'http://127.0.0.1:8082/',
baseUrl: 'http://192.168.83.215:8082/',
wsUrl: 'ws://127.0.0.1:7860/',
projectName: '灵境大模型平台'
}
......@@ -402,12 +402,12 @@ Vue.prototype.PublishWay = PublishWay;
const ModeOfSpeaking = new DictionaryBase('对话模式', [
{
id: 0,
name: 'LLM 对话',
name: '通用智能问答',
symbol: 'llm'
},
{
id: 1,
name: '知识库问答',
name: '专业知识库问答',
symbol: 'repository'
}
// {
......
<!--左侧操作界面 -->
<template>
<el-form label-position="left" ref="form" label-width="120px" :model="form" :size="defaultFormItemSize" style="padding:20px;width:400px">
<el-form-item label="对话模式:">
<el-form-item label="问答模式:">
<el-select v-model="form.pattern" placeholder="请选择" >
<el-option v-for="item in ModeOfSpeaking.getList()" :key="item.id" :label="item.name" :value="item.name">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="LLM模型:">
<el-form-item label="模型选择:">
<el-cascader v-model="form.model_name" ref="modelCascader" :options="modelList" :props='{ label: "name", value: "name", emitPath: false }' @change="changeModel"></el-cascader>
</el-form-item>
<el-form-item label="Temperature:">
......@@ -31,7 +31,7 @@
{{ form.prompt_template }}
</div>
</el-form-item>
<el-form-item label-width="0px" v-if="form.pattern == '知识库问答'">
<el-form-item label-width="0px" v-if="form.pattern == '专业知识库问答'">
<el-collapse value="1">
<el-collapse-item name="1">
<template slot="title">知识库配置</template>
......@@ -44,7 +44,7 @@
<el-form-item label="匹配知识条数:" style="margin-bottom:30px">
<el-input-number v-model="form.knowledgeConfige.top_k" :min="1" :max="20"></el-input-number>
</el-form-item>
<el-form-item label="知识匹配分数阈值:">
<el-form-item label="匹配精度:">
<el-slider v-model="knowledgeScoreThreshold" :format-tooltip="formatTooltip" @change="form.knowledgeConfige.score_threshold = knowledgeScoreThreshold / 100"></el-slider>
</el-form-item>
</el-collapse-item>
......@@ -87,7 +87,7 @@ export default {
knowledgeScoreThreshold: 50,
form: {
pattern: 'LLM 对话', // 对话模式
pattern: '通用智能问答', // 对话模式
model_name: undefined, // 模型名称
temperature: 0.7,
prompt_template: '',
......
......@@ -96,9 +96,9 @@ export default {
this.heistoryRotate = this.chatForm.heistoryRotate
this.param.prompt_template = this.isPromptTemplate ? this.chatForm.prompt_template : undefined
let apiUrl
if (this.chatForm.pattern === 'LLM 对话') {
if (this.chatForm.pattern === '通用智能问答') {
apiUrl = '/2api/chat/chat'
} else if (this.chatForm.pattern === '知识库问答') {
} else if (this.chatForm.pattern === '专业知识库问答') {
apiUrl = '/2api/chat/knowledge_base_chat'
this.param = { ...this.param, ...this.chatForm.knowledgeConfige }
} else if (this.chatForm.pattern === '搜索引擎问答') {
......@@ -128,9 +128,9 @@ export default {
},
onmessage (data) {
let nowChat = this.myHistory[this.myHistory.length - 1]
if (this.chatForm.pattern === 'LLM 对话') {
if (this.chatForm.pattern === '通用智能问答') {
nowChat.answer += data
} else if (this.chatForm.pattern === '知识库问答') {
} else if (this.chatForm.pattern === '专业知识库问答') {
console.log(data);
let temporary = JSON.parse(`[${data}]`.replace(/}{/g, '},{'))
console.log(temporary);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment