feat: add retriever rank fe (#1557)
Co-authored-by: StyleZhang <jasonapring2015@outlook.com>
This commit is contained in:
parent
e017eff5e4
commit
888e8c6dac
80 changed files with 2757 additions and 467 deletions
|
|
@ -27,6 +27,7 @@ import type {
|
|||
ValidateOpenAIKeyResponse,
|
||||
} from '@/models/app'
|
||||
import type { BackendModel, ProviderMap } from '@/app/components/header/account-setting/model-page/declarations'
|
||||
import type { RETRIEVE_METHOD } from '@/types/app'
|
||||
|
||||
export const login: Fetcher<CommonResponse & { data: string }, { url: string; body: Record<string, any> }> = ({ url, body }) => {
|
||||
return post(url, { body }) as Promise<CommonResponse & { data: string }>
|
||||
|
|
@ -237,3 +238,10 @@ export const fetchCodeBasedExtensionList: Fetcher<CodeBasedExtension, string> =
|
|||
export const moderate = (url: string, body: { app_id: string; text: string }) => {
|
||||
return post(url, { body }) as Promise<ModerateResponse>
|
||||
}
|
||||
|
||||
type RetrievalMethodsRes = {
|
||||
'retrieval_method': RETRIEVE_METHOD[]
|
||||
}
|
||||
export const fetchSupportRetrievalMethods: Fetcher<RetrievalMethodsRes, string> = (url) => {
|
||||
return get<RetrievalMethodsRes>(url)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue