浏览代码

feat: 前端的上下文路径改为/ss-ragflow,API上下文路径改为/ss-ragflow-api

Hacked_v0.15.1
fellow99 8 个月前
父节点
当前提交
aa0c55ee00
共有 3 个文件被更改,包括 5 次插入5 次删除
  1. 3
    3
      web/.umirc.ts
  2. 1
    1
      web/src/pages/chat/shared-hooks.ts
  3. 1
    1
      web/src/utils/api.ts

+ 3
- 3
web/.umirc.ts 查看文件

outputPath: 'dist', outputPath: 'dist',
alias: { '@parent': path.resolve(__dirname, '../') }, alias: { '@parent': path.resolve(__dirname, '../') },
npmClient: 'npm', npmClient: 'npm',
base: '/',
base: '/ss-ragflow/',
routes, routes,
publicPath: '/',
publicPath: '/ss-ragflow/',
esbuildMinifyIIFE: true, esbuildMinifyIIFE: true,
icons: {}, icons: {},
hash: true, hash: true,
copy: ['src/conf.json'], copy: ['src/conf.json'],
proxy: [ proxy: [
{ {
context: ['/api', '/v1'],
context: ['/ss-ragflow-api/api', '/ss-ragflow-api/v1'],
target: 'http://127.0.0.1:9380/', target: 'http://127.0.0.1:9380/',
changeOrigin: true, changeOrigin: true,
ws: true, ws: true,

+ 1
- 1
web/src/pages/chat/shared-hooks.ts 查看文件

useCreateNextSharedConversation(); useCreateNextSharedConversation();
const { handleInputChange, value, setValue } = useHandleMessageInputChange(); const { handleInputChange, value, setValue } = useHandleMessageInputChange();
const { send, answer, done } = useSendMessageWithSse( 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 { const {
derivedMessages, derivedMessages,

+ 1
- 1
web/src/utils/api.ts 查看文件

let api_host = `/v1`;
let api_host = `/ss-ragflow-api/v1`;


export { api_host }; export { api_host };



正在加载...
取消
保存