This commit is contained in:
dataeaseShu
2025-08-05 17:44:46 +08:00
5 changed files with 61 additions and 15 deletions
+1 -1
View File
@@ -81,6 +81,6 @@ class Settings(BaseSettings):
MCP_IMAGE_PATH: str = '/opt/sqlbot/images'
EXCEL_PATH: str = '/opt/sqlbot/data/excel'
MCP_IMAGE_HOST: str = 'http://localhost:3000'
SERVER_IMAGE_HOST: str
SERVER_IMAGE_HOST: str = ''
settings = Settings() # type: ignore
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

+39 -1
View File
@@ -6,6 +6,8 @@ import icon_xfhx_colorful from '@/assets/model/icon_xfhx_colorful.png'
import icon_gemini_colorful from '@/assets/model/icon_gemini_colorful.png'
import icon_openai_colorful from '@/assets/model/icon_openai_colorful.png'
import icon_kimi_colorful from '@/assets/model/icon_kimi_colorful.png'
import icon_txhy_colorful from '@/assets/model/icon_txhy_colorful.png'
import icon_hsyq_colorful from '@/assets/model/icon_hsyq_colorful.png'
type ModelArg = { key: string; val?: string | number; type: string; range?: string }
type ModelOption = { name: string; api_domain?: string; args?: ModelArg[] }
@@ -78,7 +80,7 @@ export const supplierList: Array<{
{
id: 4,
name: '腾讯混元',
icon: icon_txy_colorful,
icon: icon_txhy_colorful,
model_config: {
0: {
api_domain: 'https://api.hunyuan.cloud.tencent.com/v1/',
@@ -215,6 +217,42 @@ export const supplierList: Array<{
},
},
},
{
id: 9,
name: '腾讯云',
icon: icon_txy_colorful,
model_config: {
0: {
api_domain: 'https://api.lkeap.cloud.tencent.com/v1',
common_args: [{ key: 'temperature', val: 0.6, type: 'number', range: '[0, 1]' }],
model_options: [
{ name: 'deepseek-r1' },
{ name: 'deepseek-r1-0528' },
{ name: 'deepseek-v3' },
{ name: 'deepseek-v3-0324' },
],
},
},
},
{
id: 10,
name: '火山引擎',
icon: icon_hsyq_colorful,
model_config: {
0: {
api_domain: 'https://ark.cn-beijing.volces.com/api/v3',
common_args: [{ key: 'temperature', val: 0.6, type: 'number', range: '[0, 1]' }],
model_options: [
{ name: 'doubao-seed-1-6-250615' },
{ name: 'doubao-seed-1-6-flash-250715' },
{ name: 'doubao-1-5-pro-32k-character-250715' },
{ name: 'kimi-k2-250711' },
{ name: 'deepseek-v3-250324' },
{ name: 'deepseek-r1' },
],
},
},
},
]
export const base_model_options = (supplier_id: number, model_type?: number) => {
@@ -39,6 +39,7 @@ const props = withDefaults(
}
)
const loading = ref<boolean>(false)
const { t } = useI18n()
const addViewRef = ref(null)
const emits = defineEmits(['exitFullScreen'])
@@ -231,20 +232,26 @@ function copy() {
const exportRef = ref()
function exportToExcel() {
chatApi
.export2Excel({ ...chartRef.value?.getExcelData(), name: chartObject.value.title })
.then((res) => {
const blob = new Blob([res], {
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
if (chartRef.value) {
loading.value = true
chatApi
.export2Excel({ ...chartRef.value?.getExcelData(), name: chartObject.value.title })
.then((res) => {
const blob = new Blob([res], {
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = `${chartObject.value.title ?? 'Excel'}.xlsx`
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = `${chartObject.value.title ?? 'Excel'}.xlsx`
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
})
exportRef.value?.hide()
.finally(() => {
loading.value = false
})
exportRef.value?.hide()
}
}
function exportToImage() {
@@ -284,6 +291,7 @@ watch(
((!isPredict && (message?.record?.sql || message?.record?.chart)) ||
(isPredict && message?.record?.chart && data.length > 0))
"
v-loading.fullscreen.lock="loading"
class="chart-component-container"
:class="{ 'full-screen': enlarge }"
>