Skip to content

Commit 11a9e2c

Browse files
committed
2 parents 252bbe3 + 1a129ab commit 11a9e2c

File tree

5 files changed

+61
-15
lines changed

5 files changed

+61
-15
lines changed

backend/common/core/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,6 @@ def SQLALCHEMY_DATABASE_URI(self) -> PostgresDsn | str:
8181
MCP_IMAGE_PATH: str = '/opt/sqlbot/images'
8282
EXCEL_PATH: str = '/opt/sqlbot/data/excel'
8383
MCP_IMAGE_HOST: str = 'http://localhost:3000'
84-
SERVER_IMAGE_HOST: str
84+
SERVER_IMAGE_HOST: str = ''
8585

8686
settings = Settings() # type: ignore
5.44 KB
Loading
6.66 KB
Loading

frontend/src/entity/supplier.ts

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import icon_xfhx_colorful from '@/assets/model/icon_xfhx_colorful.png'
66
import icon_gemini_colorful from '@/assets/model/icon_gemini_colorful.png'
77
import icon_openai_colorful from '@/assets/model/icon_openai_colorful.png'
88
import icon_kimi_colorful from '@/assets/model/icon_kimi_colorful.png'
9+
import icon_txhy_colorful from '@/assets/model/icon_txhy_colorful.png'
10+
import icon_hsyq_colorful from '@/assets/model/icon_hsyq_colorful.png'
911

1012
type ModelArg = { key: string; val?: string | number; type: string; range?: string }
1113
type ModelOption = { name: string; api_domain?: string; args?: ModelArg[] }
@@ -78,7 +80,7 @@ export const supplierList: Array<{
7880
{
7981
id: 4,
8082
name: '腾讯混元',
81-
icon: icon_txy_colorful,
83+
icon: icon_txhy_colorful,
8284
model_config: {
8385
0: {
8486
api_domain: 'https://api.hunyuan.cloud.tencent.com/v1/',
@@ -215,6 +217,42 @@ export const supplierList: Array<{
215217
},
216218
},
217219
},
220+
{
221+
id: 9,
222+
name: '腾讯云',
223+
icon: icon_txy_colorful,
224+
model_config: {
225+
0: {
226+
api_domain: 'https://api.lkeap.cloud.tencent.com/v1',
227+
common_args: [{ key: 'temperature', val: 0.6, type: 'number', range: '[0, 1]' }],
228+
model_options: [
229+
{ name: 'deepseek-r1' },
230+
{ name: 'deepseek-r1-0528' },
231+
{ name: 'deepseek-v3' },
232+
{ name: 'deepseek-v3-0324' },
233+
],
234+
},
235+
},
236+
},
237+
{
238+
id: 10,
239+
name: '火山引擎',
240+
icon: icon_hsyq_colorful,
241+
model_config: {
242+
0: {
243+
api_domain: 'https://ark.cn-beijing.volces.com/api/v3',
244+
common_args: [{ key: 'temperature', val: 0.6, type: 'number', range: '[0, 1]' }],
245+
model_options: [
246+
{ name: 'doubao-seed-1-6-250615' },
247+
{ name: 'doubao-seed-1-6-flash-250715' },
248+
{ name: 'doubao-1-5-pro-32k-character-250715' },
249+
{ name: 'kimi-k2-250711' },
250+
{ name: 'deepseek-v3-250324' },
251+
{ name: 'deepseek-r1' },
252+
],
253+
},
254+
},
255+
},
218256
]
219257

220258
export const base_model_options = (supplier_id: number, model_type?: number) => {

frontend/src/views/chat/chat-block/ChartBlock.vue

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ const props = withDefaults(
3939
}
4040
)
4141
42+
const loading = ref<boolean>(false)
4243
const { t } = useI18n()
4344
const addViewRef = ref(null)
4445
const emits = defineEmits(['exitFullScreen'])
@@ -231,20 +232,26 @@ function copy() {
231232
const exportRef = ref()
232233
233234
function exportToExcel() {
234-
chatApi
235-
.export2Excel({ ...chartRef.value?.getExcelData(), name: chartObject.value.title })
236-
.then((res) => {
237-
const blob = new Blob([res], {
238-
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
235+
if (chartRef.value) {
236+
loading.value = true
237+
chatApi
238+
.export2Excel({ ...chartRef.value?.getExcelData(), name: chartObject.value.title })
239+
.then((res) => {
240+
const blob = new Blob([res], {
241+
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
242+
})
243+
const link = document.createElement('a')
244+
link.href = URL.createObjectURL(blob)
245+
link.download = `${chartObject.value.title ?? 'Excel'}.xlsx`
246+
document.body.appendChild(link)
247+
link.click()
248+
document.body.removeChild(link)
239249
})
240-
const link = document.createElement('a')
241-
link.href = URL.createObjectURL(blob)
242-
link.download = `${chartObject.value.title ?? 'Excel'}.xlsx`
243-
document.body.appendChild(link)
244-
link.click()
245-
document.body.removeChild(link)
246-
})
247-
exportRef.value?.hide()
250+
.finally(() => {
251+
loading.value = false
252+
})
253+
exportRef.value?.hide()
254+
}
248255
}
249256
250257
function exportToImage() {
@@ -284,6 +291,7 @@ watch(
284291
((!isPredict && (message?.record?.sql || message?.record?.chart)) ||
285292
(isPredict && message?.record?.chart && data.length > 0))
286293
"
294+
v-loading.fullscreen.lock="loading"
287295
class="chart-component-container"
288296
:class="{ 'full-screen': enlarge }"
289297
>

0 commit comments

Comments
 (0)