@blueking/ai-ui-sdk 0.0.12-beta.8 → 0.0.12-beta.9
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.
- package/dist/hooks/use-chat.d.ts +1 -1
- package/dist/types/type.d.ts +7 -7
- package/package.json +1 -1
package/dist/hooks/use-chat.d.ts
CHANGED
@@ -5,7 +5,7 @@ type SessionContentsMap<P extends ISessionContent = ISessionContent> = {
|
|
5
5
|
type SessionLoadingMap = {
|
6
6
|
[key: string]: boolean;
|
7
7
|
};
|
8
|
-
export declare const useChat: <T extends ISession = ISession, P extends ISessionContent = ISessionContent>({ handleStart, handleText, handleReferenceDoc, handleThink, handleEnd, handleError, requestOptions, }?: ChatCallbacks) => {
|
8
|
+
export declare const useChat: <T extends ISession = ISession, P extends ISessionContent = ISessionContent>({ handleStart, handleText, handleReferenceDoc, handleThink, handleEnd, handleError, requestOptions, }?: ChatCallbacks<P>) => {
|
9
9
|
currentSession: import("vue").Ref<T | undefined, T | undefined>;
|
10
10
|
sessionContents: import("vue").Ref<import("@vue/reactivity").UnwrapRefSimple<P>[], P[] | import("@vue/reactivity").UnwrapRefSimple<P>[]>;
|
11
11
|
sessionContentsMap: SessionContentsMap<P>;
|
package/dist/types/type.d.ts
CHANGED
@@ -47,13 +47,13 @@ export interface ISessionPrompt {
|
|
47
47
|
content: string;
|
48
48
|
role: SessionPromptRole;
|
49
49
|
}
|
50
|
-
export interface ChatCallbacks {
|
51
|
-
handleStart?: (sessionCode: string, sessionContent:
|
52
|
-
handleText?: (sessionCode: string, sessionContent:
|
53
|
-
handleReferenceDoc?: (sessionCode: string, sessionContent:
|
54
|
-
handleThink?: (sessionCode: string, sessionContent:
|
55
|
-
handleEnd?: (sessionCode: string, sessionContent:
|
56
|
-
handleError?: (sessionCode: string, sessionContent:
|
50
|
+
export interface ChatCallbacks<T extends ISessionContent = ISessionContent> {
|
51
|
+
handleStart?: (sessionCode: string, sessionContent: T) => void;
|
52
|
+
handleText?: (sessionCode: string, sessionContent: T) => void;
|
53
|
+
handleReferenceDoc?: (sessionCode: string, sessionContent: T) => void;
|
54
|
+
handleThink?: (sessionCode: string, sessionContent: T) => void;
|
55
|
+
handleEnd?: (sessionCode: string, sessionContent: T) => void;
|
56
|
+
handleError?: (sessionCode: string, sessionContent: T, code: string | undefined) => void;
|
57
57
|
requestOptions?: {
|
58
58
|
url: string;
|
59
59
|
headers?: Record<string, string>;
|