feat(knowledge-testing): add pagination and document filtering to testing interface
This commit is contained in:
@@ -5,3 +5,11 @@ export interface IPaginationRequestBody {
|
||||
orderby?: string;
|
||||
desc?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页请求参数
|
||||
*/
|
||||
export interface IPaginationBody {
|
||||
page?: number;
|
||||
size?: number;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
export interface ITestRetrievalRequestBody {
|
||||
/**
|
||||
{"similarity_threshold":0.2,
|
||||
"vector_similarity_weight":0.3,
|
||||
"top_k":1024,"use_kg":true,
|
||||
"cross_languages":["English","Chinese","Spanish","French","German",
|
||||
"Japanese","Korean","Vietnamese"],"question":"123","kb_id":"dcc2871aa4cd11f08d4116ac85b1de0a",
|
||||
"page":1,"size":10,"doc_ids":["92b37a3aa7de11f084d336b0b158b556"]}
|
||||
*/
|
||||
|
||||
import type { IPaginationBody } from "./base";
|
||||
|
||||
/**
|
||||
* 检索测试请求体
|
||||
*/
|
||||
export interface ITestRetrievalRequestBody extends IPaginationBody {
|
||||
question: string;
|
||||
similarity_threshold: number;
|
||||
vector_similarity_weight: number;
|
||||
@@ -6,13 +20,21 @@ export interface ITestRetrievalRequestBody {
|
||||
top_k?: number;
|
||||
use_kg?: boolean;
|
||||
highlight?: boolean;
|
||||
kb_id?: string[];
|
||||
kb_id?: string;
|
||||
doc_ids?: string[];
|
||||
cross_languages?: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取知识库列表请求体
|
||||
*/
|
||||
export interface IFetchKnowledgeListRequestBody {
|
||||
owner_ids?: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取知识库列表请求参数
|
||||
*/
|
||||
export interface IFetchKnowledgeListRequestParams {
|
||||
kb_id?: string;
|
||||
keywords?: string;
|
||||
@@ -20,6 +42,9 @@ export interface IFetchKnowledgeListRequestParams {
|
||||
page_size?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取文档列表请求体
|
||||
*/
|
||||
export interface IFetchDocumentListRequestBody {
|
||||
suffix?: string[];
|
||||
run_status?: string[];
|
||||
|
||||
Reference in New Issue
Block a user