@liip/liipgpt 0.0.7 → 0.0.10

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.
@@ -1,4 +1,4 @@
1
- import { Sources } from '../../../../../src/lib/liipgpt-client';
1
+ import { Sources } from '../../../../../../src/lib/liipgpt-client';
2
2
  export type ChatMessageBot = {
3
3
  type: 'bot';
4
4
  /**
File without changes
@@ -41,6 +41,22 @@ type ChatOptions = {
41
41
  model?: string;
42
42
  lang?: string;
43
43
  };
44
+ export declare const QuickFeedbackType: {
45
+ readonly Positive: "positive";
46
+ readonly Negative: "negative";
47
+ };
48
+ type QuickFeedback = {
49
+ feedback: (typeof QuickFeedbackType)[keyof typeof QuickFeedbackType];
50
+ };
51
+ type Feedback = {
52
+ query?: string;
53
+ email?: string;
54
+ body: string;
55
+ };
56
+ type Classification = {
57
+ impact: number;
58
+ quality: number;
59
+ };
44
60
  type ClientMetadata = {
45
61
  mode: 'ready';
46
62
  userId: string;
@@ -51,12 +67,17 @@ type ClientMetadata = {
51
67
  export declare class LiipGPTClient {
52
68
  private readonly apiUrl;
53
69
  private readonly apiKey;
70
+ private lastRequestId;
54
71
  metadata: Promise<ClientMetadata>;
55
72
  constructor({ apiUrl, apiKey }: LiipGPTClientOptions);
56
73
  private getUserData;
57
74
  static getInstance(): LiipGPTClient | undefined;
75
+ private postData;
58
76
  private fetchData;
59
77
  private fetchSSE;
78
+ quickFeedback(feedback: QuickFeedback): Promise<Response>;
79
+ feedback(feedback: Feedback): Promise<Response>;
80
+ classification(classification: Classification): Promise<Response>;
60
81
  getPredefinedQuestions(params: PredefinedQuestionsParams): Promise<PredefinedQuestion[]>;
61
82
  private chatInternal;
62
83
  chat(message: string, options?: ChatOptions): Readable<ChatResponse>;