Commit c6b82368 authored by chenghong_tao's avatar chenghong_tao

add 深度思考

parent af883d01
......@@ -13,6 +13,7 @@ declare module 'vue' {
ElAside: typeof import('element-plus/es')['ElAside']
ElAvatar: typeof import('element-plus/es')['ElAvatar']
ElButton: typeof import('element-plus/es')['ElButton']
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
ElCollapse: typeof import('element-plus/es')['ElCollapse']
ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
......
......@@ -130,7 +130,7 @@ async function startSSE(query) {
headers: chatMessageOptions.headers,
method: chatMessageOptions.method,
body: JSON.stringify({
inputs: {},
inputs: {think: taskStore.deepThink ? '1' : '0'},
query,
response_mode: "streaming",
conversation_id: taskStore.conversation_id,
......
......@@ -12,6 +12,7 @@
>
<template #action-list>
<div class="action-list-self-wrap">
<el-checkbox v-model="deepThink" label="深度思考" style="margin-right: 20px;" border />
<el-button
type="danger"
link
......@@ -88,6 +89,11 @@ const senderRef = ref();
const senderValue = ref("");
const senderLoading = ref(false);
const inputRef = ref(null);
const deepThink = ref(false);
watch(() => deepThink.value, (newValue) => {
taskStore.setDeepThink(newValue)
})
const emit = defineEmits(["userQuery", "getInputHeight"]);
function handleSubmit() {
......
......@@ -7,7 +7,8 @@ export const useTaskStore = defineStore('task', {
conversation_id: '', // 当前会话id
message_id: '', // 当前消息id
workflow_run_id: '', // 当前工作流运行id
isLoading: false
isLoading: false,
deepThink: false,
}
},
actions: {
......@@ -28,11 +29,16 @@ export const useTaskStore = defineStore('task', {
setIsLoading(isLoading) {
this.isLoading = isLoading
},
setDeepThink(think) {
this.deepThink = think
},
clear () {
this.taskId = ''
this.conversation_id = ''
this.message_id = ''
this.workflow_run_id = ''
this.isLoading = false
this.deepThink = false
}
},
persist: {
......
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