@blueking/chat-helper 0.0.1-beta.17 → 0.0.1-beta.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ export * from './type';
2
+ export * from './use-session';
@@ -0,0 +1,71 @@
1
+ import type { IMessage } from '../message';
2
+ export interface ISession<ITool = unknown, IAnchorPathResources = unknown> {
3
+ anchorPathResources?: IAnchorPathResources;
4
+ comment?: string;
5
+ createdAt?: string;
6
+ isTemporary?: boolean;
7
+ labels?: string[];
8
+ model?: string;
9
+ rate?: number;
10
+ sessionCode: string;
11
+ /** 会话消息数量,用于判断会话是否有内容 */
12
+ sessionContentCount?: number;
13
+ sessionName: string;
14
+ tools?: ITool[];
15
+ updatedAt?: string;
16
+ roleInfo?: {
17
+ collectionId: number;
18
+ collectionName: string;
19
+ content: IMessage[];
20
+ variables: {
21
+ name: string;
22
+ value: IMessage[] | string;
23
+ }[];
24
+ };
25
+ sessionProperty?: {
26
+ isAutoCalcPrompt?: boolean;
27
+ isAutoClear?: boolean;
28
+ };
29
+ }
30
+ export interface ISessionApi<IToolApi = unknown, IAnchorPathResourcesApi = unknown> {
31
+ anchor_path_resources?: IAnchorPathResourcesApi;
32
+ comment?: string;
33
+ created_at?: string;
34
+ is_temporary?: boolean;
35
+ labels?: string[];
36
+ model?: string;
37
+ rate?: number;
38
+ session_code: string;
39
+ /** 会话消息数量 */
40
+ session_content_count?: number;
41
+ session_name: string;
42
+ tools?: IToolApi[];
43
+ updated_at?: string;
44
+ role_info?: {
45
+ collection_id: number;
46
+ collection_name: string;
47
+ content: IMessage[];
48
+ variables: {
49
+ name: string;
50
+ value: IMessage[] | string;
51
+ }[];
52
+ };
53
+ session_property?: {
54
+ is_auto_clac_prompt?: boolean;
55
+ is_auto_clear?: boolean;
56
+ };
57
+ }
58
+ export interface ISessionFeedback {
59
+ comment: string;
60
+ labels: string[];
61
+ rate: number;
62
+ sessionCode: string;
63
+ sessionContentIds: number[];
64
+ }
65
+ export interface ISessionFeedbackApi {
66
+ comment: string;
67
+ lables: string[];
68
+ rate: number;
69
+ session_code: string;
70
+ session_content_ids: number[];
71
+ }