mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
@@ -39,7 +39,7 @@ dependencies = [
|
||||
"pyyaml (>=6.0.2,<7.0.0)",
|
||||
"fastapi-mcp (>=0.3.4,<0.4.0)",
|
||||
"tabulate>=0.9.0",
|
||||
"sqlbot-xpack>=0.0.5.23,<0.0.6.0",
|
||||
"sqlbot-xpack>=0.0.5.24,<0.0.6.0",
|
||||
"fastapi-cache2>=0.2.2",
|
||||
"sqlparse>=0.5.3",
|
||||
"redis>=6.2.0",
|
||||
|
||||
@@ -76,6 +76,7 @@
|
||||
"context_record_count": "Context Record Count",
|
||||
"context_record_count_hint": "Number of user question rounds",
|
||||
"model_thinking_process": "Expand Model Thinking Process",
|
||||
"hide_model_thinking_process": "Hide Model Thinking Process",
|
||||
"rows_of_data": "Limit 1000 Rows of Data",
|
||||
"third_party_platform_settings": "Authentication Settings",
|
||||
"by_third_party_platform": "Automatic User Creation",
|
||||
|
||||
@@ -76,6 +76,7 @@
|
||||
"context_record_count": "컨텍스트 기록 수",
|
||||
"context_record_count_hint": "사용자 질문 라운드 수",
|
||||
"model_thinking_process": "모델 사고 프로세스 확장",
|
||||
"hide_model_thinking_process": "모델 사고 과정 숨기기",
|
||||
"rows_of_data": "데이터 1,000행 제한",
|
||||
"third_party_platform_settings": "로그인 인증 설정",
|
||||
"by_third_party_platform": "자동 사용자 생성",
|
||||
|
||||
@@ -76,6 +76,7 @@
|
||||
"context_record_count": "上下文记录数",
|
||||
"context_record_count_hint": "用户提问轮数",
|
||||
"model_thinking_process": "展开模型思考过程",
|
||||
"hide_model_thinking_process": "隐藏模型思考过程",
|
||||
"rows_of_data": "限制 1000 行数据",
|
||||
"third_party_platform_settings": "登录认证设置",
|
||||
"by_third_party_platform": "自动创建用户",
|
||||
|
||||
@@ -76,6 +76,7 @@
|
||||
"context_record_count": "上下文記錄數",
|
||||
"context_record_count_hint": "使用者提問輪數",
|
||||
"model_thinking_process": "展開模型思考過程",
|
||||
"hide_model_thinking_process": "隱藏模型思考過程",
|
||||
"rows_of_data": "限制 1000 列資料",
|
||||
"third_party_platform_settings": "登入認證設定",
|
||||
"by_third_party_platform": "自動建立使用者",
|
||||
|
||||
@@ -6,6 +6,7 @@ import { formatArg } from '@/utils/utils.ts'
|
||||
interface ChatConfig {
|
||||
sqlbot_name: string
|
||||
expand_thinking_block: boolean
|
||||
hide_thinking_block: boolean
|
||||
limit_rows: boolean
|
||||
show_sql: boolean
|
||||
show_log: boolean
|
||||
@@ -16,6 +17,7 @@ export const chatConfigStore = defineStore('chatConfigStore', {
|
||||
return {
|
||||
sqlbot_name: 'SQLBot',
|
||||
expand_thinking_block: false,
|
||||
hide_thinking_block: false,
|
||||
limit_rows: true,
|
||||
show_sql: true,
|
||||
show_log: true,
|
||||
@@ -28,6 +30,9 @@ export const chatConfigStore = defineStore('chatConfigStore', {
|
||||
getExpandThinkingBlock(): boolean {
|
||||
return this.expand_thinking_block
|
||||
},
|
||||
getHideThinkingBlock(): boolean {
|
||||
return this.hide_thinking_block
|
||||
},
|
||||
getShowSQL(): boolean {
|
||||
return this.show_sql
|
||||
},
|
||||
@@ -43,6 +48,9 @@ export const chatConfigStore = defineStore('chatConfigStore', {
|
||||
request.get('/system/parameter/chat').then((res: any) => {
|
||||
if (res) {
|
||||
res.forEach((item: any) => {
|
||||
if (item.pkey === 'chat.hide_thinking_block') {
|
||||
this.hide_thinking_block = formatArg(item.pval)
|
||||
}
|
||||
if (item.pkey === 'chat.expand_thinking_block') {
|
||||
this.expand_thinking_block = formatArg(item.pval)
|
||||
}
|
||||
|
||||
@@ -50,10 +50,12 @@ const reasoningContent = computed<Array<string>>(() => {
|
||||
})
|
||||
|
||||
const hasReasoning = computed<boolean>(() => {
|
||||
if (reasoningContent.value.length > 0) {
|
||||
for (let i = 0; i < reasoningContent.value.length; i++) {
|
||||
if (reasoningContent.value[i] && reasoningContent.value[i].trim() !== '') {
|
||||
return true
|
||||
if (!chatConfig.getHideThinkingBlock) {
|
||||
if (reasoningContent.value.length > 0) {
|
||||
for (let i = 0; i < reasoningContent.value.length; i++) {
|
||||
if (reasoningContent.value[i] && reasoningContent.value[i].trim() !== '') {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ const { t } = useI18n()
|
||||
const state = reactive({
|
||||
parameterForm: reactive<any>({
|
||||
'chat.sqlbot_name': 'SQLBot',
|
||||
'chat.hide_thinking_block': false,
|
||||
'chat.expand_thinking_block': false,
|
||||
'chat.limit_rows': false,
|
||||
'chat.show_sql': false,
|
||||
@@ -114,8 +115,16 @@ onMounted(() => {
|
||||
</div>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div style="display: grid; grid-template-columns: 1fr 1fr">
|
||||
<div class="card-item">
|
||||
<div class="label">
|
||||
{{ t('parameter.hide_model_thinking_process') }}
|
||||
</div>
|
||||
<div class="value">
|
||||
<el-switch v-model="state.parameterForm['chat.hide_thinking_block']" />
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!state.parameterForm['chat.hide_thinking_block']" class="card-item">
|
||||
<div class="label">
|
||||
{{ t('parameter.model_thinking_process') }}
|
||||
|
||||
@@ -129,7 +138,7 @@ onMounted(() => {
|
||||
<el-switch v-model="state.parameterForm['chat.expand_thinking_block']" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-item" style="margin-left: 16px">
|
||||
<div class="card-item">
|
||||
<div class="label">
|
||||
{{ t('parameter.rows_of_data') }}
|
||||
<el-tooltip
|
||||
@@ -149,8 +158,6 @@ onMounted(() => {
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="card-item">
|
||||
<div class="label">
|
||||
{{ t('parameter.show_sql') }}
|
||||
@@ -159,7 +166,7 @@ onMounted(() => {
|
||||
<el-switch v-model="state.parameterForm['chat.show_sql']" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-item" style="margin-left: 16px">
|
||||
<div class="card-item">
|
||||
<div class="label">
|
||||
{{ t('parameter.show_log') }}
|
||||
</div>
|
||||
@@ -167,8 +174,6 @@ onMounted(() => {
|
||||
<el-switch v-model="state.parameterForm['chat.show_log']" />
|
||||
</div>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="card-item">
|
||||
<div class="label">
|
||||
{{ t('parameter.context_record_count') }}
|
||||
@@ -191,7 +196,7 @@ onMounted(() => {
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<platform-param />
|
||||
|
||||
Reference in New Issue
Block a user