@liip/liipgpt 0.0.18 → 0.0.22
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/chat/index.html +14 -15
- package/chat/liipgpt-chat.iife.js +215 -215
- package/lib/chat-message-types.d.ts +2 -0
- package/lib/liipgpt-client.d.ts +12 -11
- package/lib/liipgpt-client.js +239 -231
- package/lib/liipgpt-client.umd.cjs +23 -23
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ export type ChatMessageBot = {
|
|
|
5
5
|
* ISO Timestamp
|
|
6
6
|
*/
|
|
7
7
|
time: string;
|
|
8
|
+
id: string;
|
|
8
9
|
message: {
|
|
9
10
|
markdown: string;
|
|
10
11
|
html: string;
|
|
@@ -25,6 +26,7 @@ type ChatMessageError = {
|
|
|
25
26
|
* ISO Timestamp
|
|
26
27
|
*/
|
|
27
28
|
time: string;
|
|
29
|
+
id: string;
|
|
28
30
|
message: string;
|
|
29
31
|
};
|
|
30
32
|
type ChatMessageUser = {
|
package/lib/liipgpt-client.d.ts
CHANGED
|
@@ -52,15 +52,13 @@ export type ChatOptions = {
|
|
|
52
52
|
lang?: string;
|
|
53
53
|
modes?: string[];
|
|
54
54
|
};
|
|
55
|
-
export
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
type QuickFeedback = {
|
|
60
|
-
feedback: (typeof QuickFeedbackType)[keyof typeof QuickFeedbackType];
|
|
55
|
+
export type QuickFeedbackType = 'positive' | 'negative';
|
|
56
|
+
export type QuickFeedback = {
|
|
57
|
+
messageId?: string;
|
|
58
|
+
feedback: QuickFeedbackType;
|
|
61
59
|
};
|
|
62
60
|
type Feedback = {
|
|
63
|
-
|
|
61
|
+
messageId?: string;
|
|
64
62
|
email?: string;
|
|
65
63
|
body: string;
|
|
66
64
|
};
|
|
@@ -81,10 +79,12 @@ export type ClassificationConfig = {
|
|
|
81
79
|
}>;
|
|
82
80
|
};
|
|
83
81
|
};
|
|
84
|
-
type Classification = {
|
|
82
|
+
export type Classification = {
|
|
85
83
|
impact?: number;
|
|
86
84
|
quality?: number;
|
|
87
|
-
|
|
85
|
+
};
|
|
86
|
+
type ClassificationRequest = Classification & {
|
|
87
|
+
messageId?: string;
|
|
88
88
|
};
|
|
89
89
|
type ClientMetadata = {
|
|
90
90
|
mode: 'ready';
|
|
@@ -96,7 +96,8 @@ type ClientMetadata = {
|
|
|
96
96
|
export declare class LiipGPTClient {
|
|
97
97
|
private readonly apiUrl;
|
|
98
98
|
private readonly apiKey;
|
|
99
|
-
|
|
99
|
+
lastRequestId: string | undefined;
|
|
100
|
+
private idToQuestionsMap;
|
|
100
101
|
metadata: Promise<ClientMetadata>;
|
|
101
102
|
constructor({ apiUrl, apiKey }: LiipGPTClientOptions);
|
|
102
103
|
private getUserData;
|
|
@@ -107,7 +108,7 @@ export declare class LiipGPTClient {
|
|
|
107
108
|
quickFeedback(feedback: QuickFeedback): Promise<Response>;
|
|
108
109
|
feedback(feedback: Feedback): Promise<Response>;
|
|
109
110
|
getClassification(params?: Record<string, string | undefined>): Promise<ClassificationConfig>;
|
|
110
|
-
classification(
|
|
111
|
+
classification({ impact, quality, messageId }: ClassificationRequest): Promise<Response>;
|
|
111
112
|
getPredefinedQuestions(params: PredefinedQuestionsParams): Promise<PredefinedQuestion[]>;
|
|
112
113
|
private getChatConfig;
|
|
113
114
|
getMenu(params: MenuParams): Promise<MenuItem[]>;
|