feat: 内蒙古呼伦贝尔职教 OEM 支持

This commit is contained in:
2025-04-17 20:16:05 +08:00
parent 71de9bb6d2
commit 39c581f3f9
5 changed files with 27 additions and 3 deletions

2
.env.oem-hlbrzy Normal file
View File

@ -0,0 +1,2 @@
DIFY_BASE_URL=https://service3.fenshenzhike.com/v1
DIFY_API_KEY=app-58uPYnqyLAtVtBYELHUGkqD9

1
.gitignore vendored
View File

@ -22,3 +22,4 @@ logs
.env .env
.env.* .env.*
!.env.example !.env.example
!.env.oem-hlbrzy

View File

@ -25,6 +25,8 @@
}, },
"packageManager": "pnpm@9.15.3+sha512.1f79bc245a66eb0b07c5d4d83131240774642caaa86ef7d0434ab47c0d16f66b04e21e0c086eb61e62c77efc4d7f7ec071afad3796af64892fae66509173893a", "packageManager": "pnpm@9.15.3+sha512.1f79bc245a66eb0b07c5d4d83131240774642caaa86ef7d0434ab47c0d16f66b04e21e0c086eb61e62c77efc4d7f7ec071afad3796af64892fae66509173893a",
"devDependencies": { "devDependencies": {
"@iconify-json/svg-spinners": "^1.2.2",
"@iconify-json/tabler": "^1.2.17",
"@nuxt/ui": "^3.0.0", "@nuxt/ui": "^3.0.0",
"@types/markdown-it": "^14.1.2" "@types/markdown-it": "^14.1.2"
} }

View File

@ -150,8 +150,7 @@ const getPopularInquiriesByRole = () => {
}; };
const scrollArea = ref<HTMLDivElement | null>(null); const scrollArea = ref<HTMLDivElement | null>(null);
// 滤除思考过程 details/think 标签正则 const regex = /<\/think>\n\n([\s\S]*)/m;
const regex = /(?<=<\/details|think>\n\n)[\s\S]*/gm;
// 常见问题 // 常见问题
const inquiries = computed( const inquiries = computed(
@ -199,7 +198,7 @@ const onInquirySubmit = async () => {
id: botMessageId, id: botMessageId,
role: "bot", role: "bot",
message: message:
resp.data.value?.data.outputs.message.match(regex)?.[0] || resp.data.value?.data.outputs.message.match(regex)?.[1] ||
"网络繁忙,请稍后再试", "网络繁忙,请稍后再试",
}); });
} catch (error) { } catch (error) {

20
pnpm-lock.yaml generated
View File

@ -45,6 +45,12 @@ importers:
specifier: ^4.5.0 specifier: ^4.5.0
version: 4.5.0(vue@3.5.13(typescript@5.8.2)) version: 4.5.0(vue@3.5.13(typescript@5.8.2))
devDependencies: devDependencies:
'@iconify-json/svg-spinners':
specifier: ^1.2.2
version: 1.2.2
'@iconify-json/tabler':
specifier: ^1.2.17
version: 1.2.17
'@nuxt/ui': '@nuxt/ui':
specifier: ^3.0.0 specifier: ^3.0.0
version: 3.0.0(@babel/parser@7.26.9)(change-case@5.4.4)(db0@0.3.1)(embla-carousel@8.5.2)(ioredis@5.6.0)(magicast@0.3.5)(typescript@5.8.2)(vite@6.2.1(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(terser@5.39.0)(yaml@2.7.0)) version: 3.0.0(@babel/parser@7.26.9)(change-case@5.4.4)(db0@0.3.1)(embla-carousel@8.5.2)(ioredis@5.6.0)(magicast@0.3.5)(typescript@5.8.2)(vite@6.2.1(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(terser@5.39.0)(yaml@2.7.0))
@ -362,6 +368,12 @@ packages:
'@floating-ui/vue@1.1.6': '@floating-ui/vue@1.1.6':
resolution: {integrity: sha512-XFlUzGHGv12zbgHNk5FN2mUB7ROul3oG2ENdTpWdE+qMFxyNxWSRmsoyhiEnpmabNm6WnUvR1OvJfUfN4ojC1A==} resolution: {integrity: sha512-XFlUzGHGv12zbgHNk5FN2mUB7ROul3oG2ENdTpWdE+qMFxyNxWSRmsoyhiEnpmabNm6WnUvR1OvJfUfN4ojC1A==}
'@iconify-json/svg-spinners@1.2.2':
resolution: {integrity: sha512-DIErwfBWWzLfmAG2oQnbUOSqZhDxlXvr8941itMCrxQoMB0Hiv8Ww6Bln/zIgxwjDvSem2dKJtap+yKKwsB/2A==}
'@iconify-json/tabler@1.2.17':
resolution: {integrity: sha512-Jfk20IC/n7UOQQSXM600BUhAwEfg8KU1dNUF+kg4eRhbET5w1Ktyax7CDx8Z8y0H6+J/8//AXpJOEgG8YoP8rw==}
'@iconify/collections@1.0.527': '@iconify/collections@1.0.527':
resolution: {integrity: sha512-K2T2DQCtINldeAWzlpWlUoLfQv83SvkmDj+TBlV1284iyLmw+Sq0vzeJ4Xljxhgnh2u4jxNs8QAUMebFK7HFEw==} resolution: {integrity: sha512-K2T2DQCtINldeAWzlpWlUoLfQv83SvkmDj+TBlV1284iyLmw+Sq0vzeJ4Xljxhgnh2u4jxNs8QAUMebFK7HFEw==}
@ -3938,6 +3950,14 @@ snapshots:
- '@vue/composition-api' - '@vue/composition-api'
- vue - vue
'@iconify-json/svg-spinners@1.2.2':
dependencies:
'@iconify/types': 2.0.0
'@iconify-json/tabler@1.2.17':
dependencies:
'@iconify/types': 2.0.0
'@iconify/collections@1.0.527': '@iconify/collections@1.0.527':
dependencies: dependencies:
'@iconify/types': 2.0.0 '@iconify/types': 2.0.0