| @@ -20,10 +20,11 @@ RUN --mount=type=bind,from=infiniflow/ragflow_deps:latest,source=/huggingface.co | |||
| RUN --mount=type=bind,from=infiniflow/ragflow_deps:latest,source=/huggingface.co,target=/huggingface.co \ | |||
| if [ "$LIGHTEN" != "1" ]; then \ | |||
| (tar -cf - \ | |||
| /huggingface.co/BAAI/bge-large-zh-v1.5 \ | |||
| /huggingface.co/BAAI/bge-reranker-v2-m3 \ | |||
| /huggingface.co/maidalun1020/bce-embedding-base_v1 \ | |||
| /huggingface.co/maidalun1020/bce-reranker-base_v1 \ | |||
| /huggingface.co/BAAI/bge-small-zh-v1.5 \ | |||
| # /huggingface.co/BAAI/bge-large-zh-v1.5 \ | |||
| # /huggingface.co/BAAI/bge-reranker-v2-m3 \ | |||
| # /huggingface.co/maidalun1020/bce-embedding-base_v1 \ | |||
| # /huggingface.co/maidalun1020/bce-reranker-base_v1 \ | |||
| | tar -xf - --strip-components=2 -C /root/.ragflow) \ | |||
| fi | |||
| @@ -312,6 +312,7 @@ def chat(dialog, messages, stream=True, **kwargs): | |||
| last_ans = "" | |||
| answer = "" | |||
| for ans in chat_mdl.chat_streamly(prompt+prompt4citation, msg[1:], gen_conf): | |||
| if ans == None: continue # SSDESK: 修复RKLLM返回信息没有终止符的问题 | |||
| if thought: | |||
| ans = re.sub(r"<think>.*</think>", "", ans, flags=re.DOTALL) | |||
| answer = ans | |||
| @@ -28,10 +28,11 @@ repos = [ | |||
| "InfiniFlow/text_concat_xgb_v1.0", | |||
| "InfiniFlow/deepdoc", | |||
| "InfiniFlow/huqie", | |||
| "BAAI/bge-large-zh-v1.5", | |||
| "BAAI/bge-reranker-v2-m3", | |||
| "maidalun1020/bce-embedding-base_v1", | |||
| "maidalun1020/bce-reranker-base_v1", | |||
| "BAAI/bge-small-zh-v1.5", | |||
| # "BAAI/bge-large-zh-v1.5", | |||
| # "BAAI/bge-reranker-v2-m3", | |||
| # "maidalun1020/bce-embedding-base_v1", | |||
| # "maidalun1020/bce-reranker-base_v1", | |||
| ] | |||
| def download_model(repo_id): | |||
| @@ -9,9 +9,9 @@ export default defineConfig({ | |||
| outputPath: 'dist', | |||
| alias: { '@parent': path.resolve(__dirname, '../') }, | |||
| npmClient: 'npm', | |||
| base: '/', | |||
| base: '/ss-ragflow/', | |||
| routes, | |||
| publicPath: '/', | |||
| publicPath: '/ss-ragflow/', | |||
| esbuildMinifyIIFE: true, | |||
| icons: {}, | |||
| hash: true, | |||
| @@ -20,6 +20,7 @@ export default defineConfig({ | |||
| history: { | |||
| type: 'browser', | |||
| }, | |||
| exportStatic: {}, | |||
| plugins: [ | |||
| '@react-dev-inspector/umi4-plugin', | |||
| '@umijs/plugins/dist/tailwindcss', | |||
| @@ -52,7 +52,7 @@ const EmbedModal = ({ | |||
| }, []); | |||
| const generateIframeSrc = () => { | |||
| let src = `${location.origin}/chat/share?shared_id=${token}&from=${form}&auth=${beta}`; | |||
| let src = `${location.origin}/ss-ragflow/chat/share?shared_id=${token}&from=${form}&auth=${beta}`; | |||
| if (visibleAvatar) { | |||
| src += '&visible_avatar=1'; | |||
| } | |||
| @@ -82,7 +82,7 @@ export const useShowBetaEmptyError = () => { | |||
| const getUrlWithToken = (token: string, from: string = 'chat') => { | |||
| const { protocol, host } = window.location; | |||
| return `${protocol}//${host}/chat/share?shared_id=${token}&from=${from}`; | |||
| return `${protocol}//${host}/ss-ragflow/chat/share?shared_id=${token}&from=${from}`; | |||
| }; | |||
| const useFetchTokenListBeforeOtherStep = () => { | |||
| @@ -50,7 +50,7 @@ export const useSendSharedMessage = () => { | |||
| useCreateNextSharedConversation(); | |||
| const { handleInputChange, value, setValue } = useHandleMessageInputChange(); | |||
| const { send, answer, done } = useSendMessageWithSse( | |||
| `/api/v1/${from === SharedFrom.Agent ? 'agentbots' : 'chatbots'}/${conversationId}/completions`, | |||
| `/ss-ragflow-api/api/v1/${from === SharedFrom.Agent ? 'agentbots' : 'chatbots'}/${conversationId}/completions`, | |||
| ); | |||
| const { | |||
| derivedMessages, | |||
| @@ -1,4 +1,4 @@ | |||
| let api_host = `/v1`; | |||
| let api_host = `/ss-ragflow-api/v1`; | |||
| export { api_host }; | |||