|
@@ -31,16 +31,16 @@
|
|
|
<span>{{activeWindowId<=0?$t('ToolBox.AIQuestion.AI_use_intro'):`${historyList.length||0} messages`}}</span>
|
|
|
</div>
|
|
|
<div class="select-box">
|
|
|
- <!-- <el-select v-model="model" :class="{'hint':showHint}" :disabled="isTyping||(windowContentLoading&&windowContentLoading.visible)" ref="modelSelect"
|
|
|
+ <el-select v-model="model" :class="{'hint':showHint}" :disabled="isTyping||(windowContentLoading&&windowContentLoading.visible)" ref="modelSelect"
|
|
|
@click.native="selectClick"
|
|
|
@change="changeModel">
|
|
|
<el-option v-for="item in modelList" :key="item.label"
|
|
|
:label="item.label"
|
|
|
- :value="item.label">
|
|
|
+ :value="item.key">
|
|
|
<span style="float:left">{{item.label}}</span>
|
|
|
- <span style="float:right"><img :src="item.icon" style="margin-top:5px;width:24px;height:24px;"/></span>
|
|
|
+ <!-- <span style="float:right"><img :src="item.icon" style="margin-top:5px;width:24px;height:24px;"/></span> -->
|
|
|
</el-option>
|
|
|
- </el-select> -->
|
|
|
+ </el-select>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 仅这一部分滚动 -->
|
|
@@ -100,29 +100,35 @@ export default {
|
|
|
/* window-content*/
|
|
|
historyList:[],//当前窗口历史记录
|
|
|
inputText:'',
|
|
|
- model:'GPT-4 Turbo',//当前选择的模型
|
|
|
+ model:'Kimi',//当前选择的模型
|
|
|
modelOldValue:'',
|
|
|
modelList:[
|
|
|
{
|
|
|
- label:'GPT-4 Turbo',
|
|
|
+ label:'GPT',
|
|
|
+ key:'GPT-4 Turbo',
|
|
|
icon:require('@/assets/img/icons/gpt-4-turbo.png'),
|
|
|
},
|
|
|
{
|
|
|
- label:'GPT4',
|
|
|
- icon:require('@/assets/img/icons/gpt-4.png'),
|
|
|
- },
|
|
|
- {
|
|
|
- label:'gpt-3.5-turbo-16k',
|
|
|
- icon:require('@/assets/img/icons/chat-gpt-16k.png'),
|
|
|
- },
|
|
|
- {
|
|
|
- label:'gpt-3.5-turbo',
|
|
|
- icon:require('@/assets/img/icons/chat-gpt.png'),
|
|
|
- },
|
|
|
- {
|
|
|
- label:'eta',
|
|
|
- icon:require('@/assets/img/icons/horizon.png'),
|
|
|
+ label:'Kimi',
|
|
|
+ key:'Kimi',
|
|
|
+ icon:require('@/assets/img/icons/gpt-4-turbo.png'),
|
|
|
},
|
|
|
+ // {
|
|
|
+ // label:'GPT4',
|
|
|
+ // icon:require('@/assets/img/icons/gpt-4.png'),
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // label:'gpt-3.5-turbo-16k',
|
|
|
+ // icon:require('@/assets/img/icons/chat-gpt-16k.png'),
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // label:'gpt-3.5-turbo',
|
|
|
+ // icon:require('@/assets/img/icons/chat-gpt.png'),
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // label:'eta',
|
|
|
+ // icon:require('@/assets/img/icons/horizon.png'),
|
|
|
+ // },
|
|
|
],//模型列表
|
|
|
showHint:false,//选择模型提示
|
|
|
isTyping:false,//是否处于打字动画中
|
|
@@ -184,7 +190,7 @@ export default {
|
|
|
|
|
|
this.windowContentLoading&&this.windowContentLoading.close()
|
|
|
//使用模型
|
|
|
- this.model = this.historyList.length?this.historyList[this.historyList.length-1].Model:'GPT-4 Turbo'
|
|
|
+ this.model = this.historyList.length?this.historyList[this.historyList.length-1].Model:'Kimi'
|
|
|
//如果有历史记录,则滚动到底部
|
|
|
this.windowContentToBottom()
|
|
|
})
|
|
@@ -236,7 +242,7 @@ export default {
|
|
|
this.activeWindowId=0
|
|
|
this.activeWindow=null
|
|
|
this.historyList=[]
|
|
|
- this.model='GPT-4 Turbo'
|
|
|
+ this.model='Kimi'
|
|
|
this.aiFileIds=[]
|
|
|
//this.inputText=''
|
|
|
this.isTyping = false
|
|
@@ -294,9 +300,16 @@ export default {
|
|
|
//非新建窗口时,模型之间切换需弹窗提示
|
|
|
if(this.activeWindowId!==0&&value!==''){
|
|
|
//弹窗提示:切换模型
|
|
|
- this.$confirm("切换回答模型,则切换后的模型无法联系上下文进行回答,确认切换吗?", "提示", {
|
|
|
+ this.$confirm(this.$t('ToolBox.AIQuestion.operation_des'), this.$t('ToolBox.AIQuestion.operation_tips'), {
|
|
|
type: "warning"
|
|
|
}).then(()=>{
|
|
|
+ //将相关值置空
|
|
|
+ this.activeWindowId=0
|
|
|
+ this.activeWindow=null
|
|
|
+ this.historyList=[]
|
|
|
+ this.aiFileIds=[]
|
|
|
+ //this.inputText=''
|
|
|
+ this.isTyping = false
|
|
|
this.$message.success('切换模型成功')
|
|
|
}).catch(()=>{
|
|
|
//this.$message.success('已取消切换模型')
|
|
@@ -364,7 +377,7 @@ export default {
|
|
|
let params={
|
|
|
AiChatTopicId:this.activeWindowId<=0?0:this.activeWindowId,
|
|
|
Ask:inputText,
|
|
|
- // Model:this.model
|
|
|
+ Model:this.model
|
|
|
}
|
|
|
if(this.aiFileIds && this.aiFileIds.length>0){
|
|
|
// 文件检索功能
|
|
@@ -496,6 +509,7 @@ export default {
|
|
|
let formData = new FormData()
|
|
|
formData.append('File',file)
|
|
|
formData.append('AiChatTopicId',this.activeWindowId)
|
|
|
+ formData.append('Model',this.model)
|
|
|
this.windowSet.add(this.activeWindowId)
|
|
|
aiQAInterence.fileUpload(formData).then(res=>{
|
|
|
downloadHint.close()
|