forked from infiniflow/ragflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Set the default value of Self RAG to false infiniflow#1220 (infi…
…niflow#1702) ### What problem does this PR solve? fix: Set the default value of Self RAG to false infiniflow#1220 fix: Change all tool file names to kebab format ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
- Loading branch information
Showing
38 changed files
with
203 additions
and
215 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
web/src/pages/add-knowledge/components/knowledge-chunk/hooks.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
web/src/pages/add-knowledge/components/knowledge-setting/configuration.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
web/src/pages/file-manager/connect-to-knowledge-modal/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
web/src/utils/authorizationUtil.ts → web/src/utils/authorization-util.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
78 changes: 39 additions & 39 deletions
78
web/src/utils/registerServer.ts → web/src/utils/register-server.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,39 @@ | ||
import omit from 'lodash/omit'; | ||
import { RequestMethod } from 'umi-request'; | ||
|
||
type Service<T extends string> = Record< | ||
T, | ||
(params?: any, urlAppendix?: string) => any | ||
>; | ||
|
||
const registerServer = <T extends string>( | ||
opt: Record<T, { url: string; method: string }>, | ||
request: RequestMethod, | ||
) => { | ||
const server: Service<T> = {} as Service<T>; | ||
for (let key in opt) { | ||
server[key] = (params?: any, urlAppendix?: string) => { | ||
let url = opt[key].url; | ||
const requestOptions = opt[key]; | ||
if (urlAppendix) { | ||
url = url + '/' + urlAppendix; | ||
} | ||
if (opt[key].method === 'post' || opt[key].method === 'POST') { | ||
return request(url, { | ||
method: opt[key].method, | ||
data: params, | ||
}); | ||
} | ||
|
||
if (opt[key].method === 'get' || opt[key].method === 'GET') { | ||
return request.get(url, { | ||
...omit(requestOptions, ['method', 'url']), | ||
params, | ||
}); | ||
} | ||
}; | ||
} | ||
return server; | ||
}; | ||
|
||
export default registerServer; | ||
import omit from 'lodash/omit'; | ||
import { RequestMethod } from 'umi-request'; | ||
|
||
type Service<T extends string> = Record< | ||
T, | ||
(params?: any, urlAppendix?: string) => any | ||
>; | ||
|
||
const registerServer = <T extends string>( | ||
opt: Record<T, { url: string; method: string }>, | ||
request: RequestMethod, | ||
) => { | ||
const server: Service<T> = {} as Service<T>; | ||
for (let key in opt) { | ||
server[key] = (params?: any, urlAppendix?: string) => { | ||
let url = opt[key].url; | ||
const requestOptions = opt[key]; | ||
if (urlAppendix) { | ||
url = url + '/' + urlAppendix; | ||
} | ||
if (opt[key].method === 'post' || opt[key].method === 'POST') { | ||
return request(url, { | ||
method: opt[key].method, | ||
data: params, | ||
}); | ||
} | ||
|
||
if (opt[key].method === 'get' || opt[key].method === 'GET') { | ||
return request.get(url, { | ||
...omit(requestOptions, ['method', 'url']), | ||
params, | ||
}); | ||
} | ||
}; | ||
} | ||
return server; | ||
}; | ||
|
||
export default registerServer; |
Oops, something went wrong.