@liip/liipgpt 0.0.22 → 0.0.23
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/README.md +7 -2
- package/chat/index.html +1 -1
- package/chat/liipgpt-chat.iife.js +138 -169
- package/lib/index.d.ts +1 -0
- package/lib/liipgpt-client.d.ts +5 -29
- package/lib/liipgpt-client.js +4303 -1288
- package/lib/liipgpt-client.umd.cjs +48 -46
- package/lib/types.d.ts +434 -0
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
package/lib/liipgpt-client.d.ts
CHANGED
|
@@ -1,18 +1,10 @@
|
|
|
1
|
+
import { ClassificationConfig, MenuItem, PredefinedQuestion } from '../../../../../src/lib/types';
|
|
1
2
|
import { Readable } from 'svelte/store';
|
|
2
3
|
import { ChatMessageBot } from './chat-message-types';
|
|
3
4
|
type LiipGPTClientOptions = {
|
|
4
5
|
apiUrl: string;
|
|
5
6
|
apiKey?: string;
|
|
6
|
-
|
|
7
|
-
export type PredefinedQuestion = {
|
|
8
|
-
label: string | null;
|
|
9
|
-
question: string;
|
|
10
|
-
};
|
|
11
|
-
export type MenuItem = {
|
|
12
|
-
label: string;
|
|
13
|
-
icon: string;
|
|
14
|
-
url: string;
|
|
15
|
-
target: string;
|
|
7
|
+
strict?: boolean;
|
|
16
8
|
};
|
|
17
9
|
export type Language = 'en' | 'de' | 'fr' | 'it';
|
|
18
10
|
export type ReferenceData = {
|
|
@@ -62,23 +54,6 @@ type Feedback = {
|
|
|
62
54
|
email?: string;
|
|
63
55
|
body: string;
|
|
64
56
|
};
|
|
65
|
-
export type ClassificationConfig = {
|
|
66
|
-
enabled: boolean;
|
|
67
|
-
impact: {
|
|
68
|
-
label: string;
|
|
69
|
-
options: Array<{
|
|
70
|
-
label: string;
|
|
71
|
-
value: number;
|
|
72
|
-
}>;
|
|
73
|
-
};
|
|
74
|
-
quality: {
|
|
75
|
-
label: string;
|
|
76
|
-
options: Array<{
|
|
77
|
-
label: string;
|
|
78
|
-
value: number;
|
|
79
|
-
}>;
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
57
|
export type Classification = {
|
|
83
58
|
impact?: number;
|
|
84
59
|
quality?: number;
|
|
@@ -96,10 +71,11 @@ type ClientMetadata = {
|
|
|
96
71
|
export declare class LiipGPTClient {
|
|
97
72
|
private readonly apiUrl;
|
|
98
73
|
private readonly apiKey;
|
|
74
|
+
private readonly strict;
|
|
99
75
|
lastRequestId: string | undefined;
|
|
100
76
|
private idToQuestionsMap;
|
|
101
77
|
metadata: Promise<ClientMetadata>;
|
|
102
|
-
constructor({ apiUrl, apiKey }: LiipGPTClientOptions);
|
|
78
|
+
constructor({ apiUrl, apiKey, strict }: LiipGPTClientOptions);
|
|
103
79
|
private getUserData;
|
|
104
80
|
static getInstance(): LiipGPTClient | undefined;
|
|
105
81
|
private postData;
|
|
@@ -107,7 +83,7 @@ export declare class LiipGPTClient {
|
|
|
107
83
|
private fetchSSE;
|
|
108
84
|
quickFeedback(feedback: QuickFeedback): Promise<Response>;
|
|
109
85
|
feedback(feedback: Feedback): Promise<Response>;
|
|
110
|
-
getClassification(params?: Record<string, string | undefined>): Promise<ClassificationConfig>;
|
|
86
|
+
getClassification(params?: Record<string, string | undefined>): Promise<ClassificationConfig | undefined>;
|
|
111
87
|
classification({ impact, quality, messageId }: ClassificationRequest): Promise<Response>;
|
|
112
88
|
getPredefinedQuestions(params: PredefinedQuestionsParams): Promise<PredefinedQuestion[]>;
|
|
113
89
|
private getChatConfig;
|