feat: support sub route config (#3071)

* feat: support sub route config

* dockerfile

* fix upload

* delete unused code
This commit is contained in:
heheer
2024-11-07 13:53:23 +08:00
committed by GitHub
parent dc95ab1dc1
commit 3b82ed0aa1
37 changed files with 100 additions and 168 deletions

View File

@@ -8,6 +8,7 @@ import { TTSTypeEnum } from '@/web/core/app/constants';
import { useTranslation } from 'next-i18next';
import type { OutLinkChatAuthProps } from '@fastgpt/global/support/permission/chat.d';
import { useMount } from 'ahooks';
import { getWebReqUrl } from '@fastgpt/web/common/system/utils';
const contentType = 'audio/mpeg';
const splitMarker = 'SPLIT_MARKER';
@@ -45,7 +46,7 @@ export const useAudioPlay = (props?: OutLinkChatAuthProps & { ttsConfig?: AppTTS
setAudioLoading(true);
audioController.current = new AbortController();
const response = await fetch('/api/core/chat/item/getSpeech', {
const response = await fetch(getWebReqUrl('/api/core/chat/item/getSpeech'), {
method: 'POST',
headers: {
'Content-Type': 'application/json'