kefu/static/templates/default/setting_llm.html

134 lines
10 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{{template "header" }}
<div id="app" style="width:100%">
<template>
<el-tabs type="border-card">
<el-tab-pane label="大模型设置">
<el-form style="font-size: 14px;width: 1100px">
<el-form-item label="是否开启">
<el-switch
v-model="chatGPT.qdrantStatus"
active-color="#13ce66"
inactive-color="#dcdfe6"
active-text="打开"
inactive-text="关闭"
active-value="true"
@change="setEntConfigItem('是否开启向量知识库AI','QdrantAIStatus',chatGPT.qdrantStatus)"
>
</el-switch>
<div style="padding: 10px; margin: 10px 0px; background-color: rgb(253, 246, 236); color: rgb(230, 162, 60);">
<div style="display: flex">
<img src="/static/images/ua/openai.svg" style="margin-right: 10px"/> 接口地址填写大模型中转代理商地址例如https://代理商接口地址
</div>
<div style="display: flex">
<img src="/static/images/ua/azure-openai.svg" style="margin-right: 10px"/> 接口地址填写大模型$AZURE_OPENAI_ENDPOINT例如https://xxxx.openai.azure.com/
</div>
<div style="display: flex;align-items: center;">
<img src="/static/images/fastgpt.svg" style="width: 30px;height: 30px;margin-right: 10px"/>FastGPT智能体平台 接口地址填写API根地址接口密钥填写API KEY
</div>
<div style="display: flex;align-items: center;">
<img src="/static/images/coze.png" style="width: 30px;height: 30px;margin-right: 10px"/>coze扣子智能体平台 接口地址填写coze的机器人ID接口密钥填写API KEY聊天补全模型选择coze
</div>
</div>
<div style="border:1px dashed #ccc;padding: 20px;margin:10px 0px;">
<el-form-item label="接口地址">
<el-input v-model="chatGPT.url" @change="setEntConfigItem('chatGPT OpenAI接口地址','chatGPTUrl',chatGPT.url)"></el-input>
</el-form-item>
<el-form-item label="接口密钥">
<el-input v-model="chatGPT.secret" @change="setEntConfigItem('chatGPT OpenAI接口密钥','chatGPTSecret',chatGPT.secret)"></el-input>
</el-form-item>
<el-form-item label="选择聊天补全模型" style="margin-top: 20px">
<el-select v-model="bigModel.name" placeholder="请选择聊天补全模型" @change="setEntConfigItem('聊天补全模型','BigModelName',bigModel.name)">
<el-option label="gpt-3.5-turbo" value="gpt-3.5-turbo"></el-option>
<el-option label="gpt-3.5-turbo-16k" value="gpt-3.5-turbo-16k"></el-option>
<el-option label="gpt-4o" value="gpt-4o"></el-option>
<el-option label="gpt-4" value="gpt-4"></el-option>
<el-option label="gpt-4-32k" value="gpt-4-32k"></el-option>
<el-option label="qwen-turbo" value="qwen-turbo"></el-option>
<el-option label="qwen-plus" value="qwen-plus"></el-option>
<el-option label="qwen-max" value="qwen-max"></el-option>
<el-option label="qwen-max-longcontext" value="qwen-max-longcontext"></el-option>
<el-option label="ERNIE-Bot" value="ERNIE-Bot"></el-option>
<el-option label="ERNIE-Bot-turbo" value="ERNIE-Bot-turbo"></el-option>
<el-option label="SparkDesk" value="SparkDesk"></el-option>
<el-option label="ChatGLM_Lite" value="ChatGLM_Lite"></el-option>
<el-option label="ChatGLM_Lite_32K" value="ChatGLM_Lite_32K"></el-option>
<el-option label="ChatGLM_Pro" value="ChatGLM_Pro"></el-option>
<el-option label="ChatGLM_Std" value="ChatGLM_Std"></el-option>
<el-option label="moonshot-v1-8k" value="moonshot-v1-8k"></el-option>
<el-option label="moonshot-v1-32k" value="moonshot-v1-32k"></el-option>
<el-option label="moonshot-v1-128k" value="moonshot-v1-128k"></el-option>
<el-option label="coze扣子智能体" value="coze"></el-option>
</el-select>
</el-form-item>
<el-form-item label="选择向量转换模型" style="margin-top: 20px">
<el-select v-model="bigModel.embedding" placeholder="请选择向量转换模型" @change="setEntConfigItem('向量转换模型','EmbeddingModelName',bigModel.embedding)">
<el-option label="text-embedding-ada-002" value="text-embedding-ada-002"></el-option>
<el-option label="text-embedding-3-small" value="text-embedding-3-small"></el-option>
<el-option label="text-embedding-v1" value="text-embedding-v1"></el-option>
<el-option label="text-embedding-v2" value="text-embedding-v2"></el-option>
</el-select>
</el-form-item>
</div>
</el-form-item>
<el-form-item label="管理员创建向量库集合后请填写向量知识库AI集合名称不填为默认AI对话无知识库嵌入">
<el-input v-model="chatGPT.qdrantAICollect" @change="setEntConfigItem('请填写向量知识库AI集合名称','QdrantAICollect',chatGPT.qdrantAICollect)"></el-input>
</el-form-item>
<el-form-item v-if="chatGPT.qdrantAICollect">
<el-button type="primary" @click="openSelfUrl('/setting_training')">立即训练</el-button>
</el-form-item>
<el-form-item label="系统提示词,人设和通用知识背景,例如:假设你是个销售,你叫晓雅,你需要根据知识信息回答问题">
<el-input type="textarea" rows="6" v-model="chatGPT.system" @change="setEntConfigItem('chatGPT OpenAI系统词system','chatGPTSystem',chatGPT.system)"></el-input>
</el-form-item>
<el-form-item label="强调提示词,每次提问都拼接在用户问题前面,用于特别强调的提示语">
<el-input type="textarea" rows="2" v-model="chatGPT.prompt" @change="setEntConfigItem('chatGPT OpenAI提示词','chatGPTPrompt',chatGPT.prompt)"></el-input>
</el-form-item>
<el-form-item label="向量搜索相似度分值(默认0.78,越高搜索到的内容越少,但是也越精准)">
<el-input v-model="chatGPT.score" @change="setEntConfigItem('向量相似度分值','QdrantScore',chatGPT.score)"></el-input>
</el-form-item>
<el-form-item label="知识库搜索为空时是否中断AI回复">
<el-switch
v-model="chatGPT.searchEmptyInterrupt"
active-color="#13ce66"
inactive-color="#dcdfe6"
active-value="true"
@change="setEntConfigItem('知识库搜索为空时是否中断AI回复','SearchEmptyInterrupt',chatGPT.searchEmptyInterrupt)"
>
</el-switch>
</el-form-item>
<el-form-item label="历史会话上下文条数(默认5条)">
<el-input v-model="chatGPT.historyNum" @change="setEntConfigItem('向量相似度分值','QdrantHistoryNum',chatGPT.historyNum)"></el-input>
</el-form-item>
<el-form-item label="反问提示词" style="display: none">
<el-tooltip content="假设你是获取线索机器人你必须严格按照下面的话术流程一步一步按顺序引导用户回复不能超过30字
我提供给你以下话术列表:'''
请问您的微信是多少呢?
好的,请问怎么称呼您?
好的呢可能你咨询的问题在线上没法沟通清楚方便的话可以加我的微信llike620。
'''
客户问题:" placement="top">
<el-input type="textarea" rows="4" v-model="chatGPT.revQuestion" @change="setEntConfigItem('chatGPT OpenAIRevQuestion','chatGPTRevQuestion',chatGPT.revQuestion)"></el-input>
</el-tooltip>
</el-form-item>
<el-form-item style="display: none" label="管理员创建向量库集合后可以上传excel文档每一条为一条向量记录">
<br/>
<el-upload
:action="uploadQdrantUrl+'&collect='+chatGPT.qdrantAICollect"
:on-success="uploadQdrantSuccess"
:on-error="uploadQdrantError"
:before-upload="beforeuploadQdrant"
>
<el-button type="primary" icon="el-icon-upload">上传xlsx</el-button>
</el-upload>
</el-form-item>
</el-form>
</el-tab-pane>
</el-tabs>
</template>
</div>
</body>
{{template "setting_bottom" .}}