feat: add retriever rank fe (#1557)

Co-authored-by: StyleZhang <jasonapring2015@outlook.com>
This commit is contained in:
Joel
2023-11-18 11:53:35 +08:00
committed by GitHub
parent e017eff5e4
commit 888e8c6dac
80 changed files with 2757 additions and 467 deletions

View File

@@ -1,5 +1,6 @@
import type { AppMode } from './app'
import type { DataSourceNotionPage } from './common'
import type { RetrievalConfig } from '@/types/app'
export enum DataSourceType {
FILE = 'upload_file',
@@ -25,6 +26,8 @@ export type DataSet = {
embedding_model: string
embedding_model_provider: string
embedding_available: boolean
retrieval_model_dict: RetrievalConfig
retrieval_model: RetrievalConfig
}
export type CustomFile = File & {
@@ -193,6 +196,7 @@ export type DocumentReq = {
export type CreateDocumentReq = DocumentReq & {
data_source: DataSource
retrieval_model: RetrievalConfig
}
export type IndexingEstimateParams = DocumentReq & Partial<DataSource> & {

View File

@@ -1,4 +1,4 @@
import type { ModelModeType } from '@/types/app'
import type { ModelModeType, RETRIEVE_TYPE } from '@/types/app'
export type Inputs = Record<string, string | number | object>
export enum PromptMode {
@@ -107,9 +107,16 @@ export type DatasetConfigItem = {
enable: boolean
value: number
}
export type DatasetConfigs = {
retrieval_model: RETRIEVE_TYPE
reranking_model: {
reranking_provider_name: string
reranking_model_name: string
}
top_k: number
score_threshold: DatasetConfigItem
score_threshold_enabled: boolean
score_threshold: number
}
export type DebugRequestBody = {