Initial commit of akmon project
This commit is contained in:
55
uni_modules/rag-req/interface.uts
Normal file
55
uni_modules/rag-req/interface.uts
Normal file
@@ -0,0 +1,55 @@
|
||||
// agent session 列表参数类型
|
||||
export type AgentSessionListOptions = {
|
||||
page?: number,
|
||||
page_size?: number,
|
||||
orderby?: string,
|
||||
desc?: boolean,
|
||||
id?: string,
|
||||
user_id?: string,
|
||||
dsl?: string
|
||||
}
|
||||
// rag-req 类型声明
|
||||
|
||||
export type RagReqOptions = {
|
||||
url: string;
|
||||
method?: string;
|
||||
headers?: UTSJSONObject;
|
||||
data?: any;
|
||||
timeout?: number;
|
||||
};
|
||||
|
||||
export type RagReqResponse<T = any> = {
|
||||
status: number;
|
||||
data: T;
|
||||
headers: UTSJSONObject;
|
||||
error?: string | null;
|
||||
total?: number | null;
|
||||
page?: number | null;
|
||||
limit?: number | null;
|
||||
hasmore?: boolean | null;
|
||||
origin?: any | null;
|
||||
};
|
||||
|
||||
export interface RagReqError {
|
||||
code: number;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface RagSessionData {
|
||||
id: string;
|
||||
session_name?: string;
|
||||
total_messages?: number;
|
||||
last_message_at?: string;
|
||||
is_active?: boolean;
|
||||
// 索引签名已移除,兼容 UTS
|
||||
}
|
||||
|
||||
export interface RagMessageData {
|
||||
id?: string;
|
||||
role?: string;
|
||||
content?: string;
|
||||
created_at?: string;
|
||||
answer?: string;
|
||||
message?: string;
|
||||
// 索引签名已移除,兼容 UTS
|
||||
}
|
||||
Reference in New Issue
Block a user