@liip/liipgpt 3.8.6 → 3.8.8
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/button/liipgpt-button.iife.js +28 -28
- package/chat/liipgpt-chat.iife.js +17 -17
- package/chat/liipgpt-chat.js +17 -17
- package/config/index.cjs +6 -1
- package/config/index.d.ts +40 -0
- package/config/index.js +6 -1
- package/configurator/_app/env.js +1 -1
- package/configurator/_app/immutable/chunks/{BUUeJ3PL.js → B1VLJAWl.js} +1 -1
- package/configurator/_app/immutable/chunks/{BcRC19q0.js → BThXwhFk.js} +2 -2
- package/configurator/_app/immutable/chunks/{BEOeYw29.js → ByLyZfiO.js} +1 -1
- package/configurator/_app/immutable/chunks/{D_H7sg4g.js → CLl5gEfw.js} +1 -1
- package/configurator/_app/immutable/chunks/CXYpP8Fa.js +1 -0
- package/configurator/_app/immutable/chunks/{CEu7mztv.js → Cb3gIg53.js} +1 -1
- package/configurator/_app/immutable/chunks/{eof59qSA.js → CsIXc9rO.js} +1 -1
- package/configurator/_app/immutable/chunks/{CNMUyLhW.js → D4lzvFU-.js} +1 -1
- package/configurator/_app/immutable/chunks/{Docn--tg.js → DD3RAJ8B.js} +1 -1
- package/configurator/_app/immutable/chunks/{De77gmQ_.js → DEY8R0rI.js} +3 -3
- package/configurator/_app/immutable/chunks/{-qY1__IK.js → Diig9Xzm.js} +2 -2
- package/configurator/_app/immutable/chunks/{DD7RUfH0.js → DspNmdd3.js} +1 -1
- package/configurator/_app/immutable/chunks/{CskLxzhu.js → FE67vUEF.js} +1 -1
- package/configurator/_app/immutable/chunks/MDgh7vpS.js +1 -0
- package/configurator/_app/immutable/chunks/{CWciD3in.js → lbyDY_EY.js} +1 -1
- package/configurator/_app/immutable/entry/{app.TwBWfpPg.js → app.D8A2Wk_Y.js} +2 -2
- package/configurator/_app/immutable/entry/start.BTBTEemi.js +1 -0
- package/configurator/_app/immutable/nodes/{0.7vFI_dZi.js → 0.BpZJAYAD.js} +1 -1
- package/configurator/_app/immutable/nodes/{1.RIoMA8xn.js → 1.D2RYczjj.js} +1 -1
- package/configurator/_app/immutable/nodes/{2.D384dkHE.js → 2.CgkGw0hU.js} +3 -3
- package/configurator/_app/immutable/nodes/{3.CiByyjYN.js → 3.CR0LqvkA.js} +1 -1
- package/configurator/_app/version.json +1 -1
- package/configurator/index.html +6 -6
- package/configurator/sidebar.html +6 -6
- package/index.cjs +14 -1
- package/index.d.ts +155 -0
- package/index.js +14 -1
- package/package.json +1 -1
- package/search-summary/liipgpt-search-summary.iife.js +5 -5
- package/configurator/_app/immutable/chunks/B08O5lEA.js +0 -1
- package/configurator/_app/immutable/chunks/BQ-t0fFK.js +0 -1
- package/configurator/_app/immutable/entry/start.COXnrrUL.js +0 -1
package/index.d.ts
CHANGED
|
@@ -4006,6 +4006,10 @@ declare const chatErrorsSchema: z.ZodUnion<readonly [
|
|
|
4006
4006
|
z.ZodLiteral<"client-error">,
|
|
4007
4007
|
z.ZodLiteral<"unexpected-call">
|
|
4008
4008
|
]>;
|
|
4009
|
+
declare const preAnswerNoticeSchema: z.ZodObject<{
|
|
4010
|
+
text: z.ZodString;
|
|
4011
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
4012
|
+
}, z.core.$strip>;
|
|
4009
4013
|
export declare const chatMessageBotStreamingSchema: z.ZodObject<{
|
|
4010
4014
|
type: z.ZodLiteral<"bot">;
|
|
4011
4015
|
time: z.ZodString;
|
|
@@ -4140,6 +4144,10 @@ export declare const chatMessageBotStreamingSchema: z.ZodObject<{
|
|
|
4140
4144
|
]>>;
|
|
4141
4145
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
4142
4146
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
4147
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
4148
|
+
text: z.ZodString;
|
|
4149
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
4150
|
+
}, z.core.$strip>>;
|
|
4143
4151
|
state: z.ZodEnum<{
|
|
4144
4152
|
streaming: "streaming";
|
|
4145
4153
|
done: "done";
|
|
@@ -4279,6 +4287,10 @@ export declare const chatMessageBotLoadingSchema: z.ZodObject<{
|
|
|
4279
4287
|
]>>;
|
|
4280
4288
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
4281
4289
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
4290
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
4291
|
+
text: z.ZodString;
|
|
4292
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
4293
|
+
}, z.core.$strip>>;
|
|
4282
4294
|
state: z.ZodLiteral<"loading">;
|
|
4283
4295
|
}, z.core.$strip>;
|
|
4284
4296
|
export declare const chatContentSchema: z.ZodUnion<readonly [
|
|
@@ -4416,6 +4428,10 @@ export declare const chatContentSchema: z.ZodUnion<readonly [
|
|
|
4416
4428
|
]>>;
|
|
4417
4429
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
4418
4430
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
4431
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
4432
|
+
text: z.ZodString;
|
|
4433
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
4434
|
+
}, z.core.$strip>>;
|
|
4419
4435
|
state: z.ZodLiteral<"loading">;
|
|
4420
4436
|
}, z.core.$strip>,
|
|
4421
4437
|
z.ZodObject<{
|
|
@@ -4552,6 +4568,10 @@ export declare const chatContentSchema: z.ZodUnion<readonly [
|
|
|
4552
4568
|
]>>;
|
|
4553
4569
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
4554
4570
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
4571
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
4572
|
+
text: z.ZodString;
|
|
4573
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
4574
|
+
}, z.core.$strip>>;
|
|
4555
4575
|
state: z.ZodEnum<{
|
|
4556
4576
|
streaming: "streaming";
|
|
4557
4577
|
done: "done";
|
|
@@ -4694,6 +4714,10 @@ export declare const chatMessageSchema: z.ZodUnion<readonly [
|
|
|
4694
4714
|
]>>;
|
|
4695
4715
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
4696
4716
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
4717
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
4718
|
+
text: z.ZodString;
|
|
4719
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
4720
|
+
}, z.core.$strip>>;
|
|
4697
4721
|
state: z.ZodLiteral<"loading">;
|
|
4698
4722
|
}, z.core.$strip>,
|
|
4699
4723
|
z.ZodObject<{
|
|
@@ -4830,6 +4854,10 @@ export declare const chatMessageSchema: z.ZodUnion<readonly [
|
|
|
4830
4854
|
]>>;
|
|
4831
4855
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
4832
4856
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
4857
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
4858
|
+
text: z.ZodString;
|
|
4859
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
4860
|
+
}, z.core.$strip>>;
|
|
4833
4861
|
state: z.ZodEnum<{
|
|
4834
4862
|
streaming: "streaming";
|
|
4835
4863
|
done: "done";
|
|
@@ -4918,6 +4946,7 @@ export type ChatMessageComponent = z.infer<typeof chatMessageEmbedSchema>;
|
|
|
4918
4946
|
export type ConversationState = z.infer<typeof conversationStateSchema>;
|
|
4919
4947
|
export type ChatContent = z.infer<typeof chatContentSchema>;
|
|
4920
4948
|
export type ChatMessage = z.infer<typeof chatMessageSchema>;
|
|
4949
|
+
export type PreAnswerNotice = z.infer<typeof preAnswerNoticeSchema>;
|
|
4921
4950
|
export type ChatReference = z.infer<typeof chatReferenceSchema>;
|
|
4922
4951
|
export type ChatReferenceWithIndexes = z.infer<typeof chatReferenceWithIndexesSchema>;
|
|
4923
4952
|
export type ChatReferences = z.infer<typeof chatReferencesSchema>;
|
|
@@ -5017,6 +5046,11 @@ export type SseMessageV2 = {
|
|
|
5017
5046
|
} | {
|
|
5018
5047
|
type: "chat-footer-text";
|
|
5019
5048
|
text: string;
|
|
5049
|
+
} | {
|
|
5050
|
+
/** Shown as its own bubble above the answer, e.g. "the answers are translated from French". */
|
|
5051
|
+
type: "pre-answer-notice";
|
|
5052
|
+
text: string;
|
|
5053
|
+
lang?: string;
|
|
5020
5054
|
};
|
|
5021
5055
|
/** Callback to inform of a value updates. */
|
|
5022
5056
|
export type Subscriber<T> = (value: T) => void;
|
|
@@ -5052,6 +5086,7 @@ export declare class ChatResultBuilder {
|
|
|
5052
5086
|
addMappedReference(reference: ChatReference): void;
|
|
5053
5087
|
addOldReference(oldReference: SseReference): void;
|
|
5054
5088
|
updateRetrievalQuestion(question: string): void;
|
|
5089
|
+
setPreAnswerNotice(preAnswerNotice: PreAnswerNotice): void;
|
|
5055
5090
|
setNoFeedback(): void;
|
|
5056
5091
|
getReadableStore(): Readable<ChatContent>;
|
|
5057
5092
|
getPromise(): Promise<ChatContent>;
|
|
@@ -6438,6 +6473,10 @@ export declare const completeChatConfigSchema: z.ZodObject<{
|
|
|
6438
6473
|
]>>;
|
|
6439
6474
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
6440
6475
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
6476
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
6477
|
+
text: z.ZodString;
|
|
6478
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
6479
|
+
}, z.core.$strip>>;
|
|
6441
6480
|
state: z.ZodLiteral<"loading">;
|
|
6442
6481
|
}, z.core.$strip>,
|
|
6443
6482
|
z.ZodObject<{
|
|
@@ -6574,6 +6613,10 @@ export declare const completeChatConfigSchema: z.ZodObject<{
|
|
|
6574
6613
|
]>>;
|
|
6575
6614
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
6576
6615
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
6616
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
6617
|
+
text: z.ZodString;
|
|
6618
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
6619
|
+
}, z.core.$strip>>;
|
|
6577
6620
|
state: z.ZodEnum<{
|
|
6578
6621
|
streaming: "streaming";
|
|
6579
6622
|
done: "done";
|
|
@@ -6788,6 +6831,10 @@ export declare const completeChatConfigSchema: z.ZodObject<{
|
|
|
6788
6831
|
]>>;
|
|
6789
6832
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
6790
6833
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
6834
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
6835
|
+
text: z.ZodString;
|
|
6836
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
6837
|
+
}, z.core.$strip>>;
|
|
6791
6838
|
state: z.ZodLiteral<"loading">;
|
|
6792
6839
|
}, z.core.$strip>,
|
|
6793
6840
|
z.ZodObject<{
|
|
@@ -6924,6 +6971,10 @@ export declare const completeChatConfigSchema: z.ZodObject<{
|
|
|
6924
6971
|
]>>;
|
|
6925
6972
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
6926
6973
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
6974
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
6975
|
+
text: z.ZodString;
|
|
6976
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
6977
|
+
}, z.core.$strip>>;
|
|
6927
6978
|
state: z.ZodEnum<{
|
|
6928
6979
|
streaming: "streaming";
|
|
6929
6980
|
done: "done";
|
|
@@ -7137,6 +7188,10 @@ export declare const completeChatConfigSchema: z.ZodObject<{
|
|
|
7137
7188
|
]>>;
|
|
7138
7189
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
7139
7190
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
7191
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
7192
|
+
text: z.ZodString;
|
|
7193
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
7194
|
+
}, z.core.$strip>>;
|
|
7140
7195
|
state: z.ZodLiteral<"loading">;
|
|
7141
7196
|
}, z.core.$strip>,
|
|
7142
7197
|
z.ZodObject<{
|
|
@@ -7273,6 +7328,10 @@ export declare const completeChatConfigSchema: z.ZodObject<{
|
|
|
7273
7328
|
]>>;
|
|
7274
7329
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
7275
7330
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
7331
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
7332
|
+
text: z.ZodString;
|
|
7333
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
7334
|
+
}, z.core.$strip>>;
|
|
7276
7335
|
state: z.ZodEnum<{
|
|
7277
7336
|
streaming: "streaming";
|
|
7278
7337
|
done: "done";
|
|
@@ -7488,6 +7547,10 @@ export declare const completeChatConfigSchema: z.ZodObject<{
|
|
|
7488
7547
|
]>>;
|
|
7489
7548
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
7490
7549
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
7550
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
7551
|
+
text: z.ZodString;
|
|
7552
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
7553
|
+
}, z.core.$strip>>;
|
|
7491
7554
|
state: z.ZodLiteral<"loading">;
|
|
7492
7555
|
}, z.core.$strip>,
|
|
7493
7556
|
z.ZodObject<{
|
|
@@ -7624,6 +7687,10 @@ export declare const completeChatConfigSchema: z.ZodObject<{
|
|
|
7624
7687
|
]>>;
|
|
7625
7688
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
7626
7689
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
7690
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
7691
|
+
text: z.ZodString;
|
|
7692
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
7693
|
+
}, z.core.$strip>>;
|
|
7627
7694
|
state: z.ZodEnum<{
|
|
7628
7695
|
streaming: "streaming";
|
|
7629
7696
|
done: "done";
|
|
@@ -7837,6 +7904,10 @@ export declare const completeChatConfigSchema: z.ZodObject<{
|
|
|
7837
7904
|
]>>;
|
|
7838
7905
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
7839
7906
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
7907
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
7908
|
+
text: z.ZodString;
|
|
7909
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
7910
|
+
}, z.core.$strip>>;
|
|
7840
7911
|
state: z.ZodLiteral<"loading">;
|
|
7841
7912
|
}, z.core.$strip>,
|
|
7842
7913
|
z.ZodObject<{
|
|
@@ -7973,6 +8044,10 @@ export declare const completeChatConfigSchema: z.ZodObject<{
|
|
|
7973
8044
|
]>>;
|
|
7974
8045
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
7975
8046
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
8047
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
8048
|
+
text: z.ZodString;
|
|
8049
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
8050
|
+
}, z.core.$strip>>;
|
|
7976
8051
|
state: z.ZodEnum<{
|
|
7977
8052
|
streaming: "streaming";
|
|
7978
8053
|
done: "done";
|
|
@@ -9105,6 +9180,10 @@ export declare const chatConfigSchema: z.ZodObject<{
|
|
|
9105
9180
|
]>>;
|
|
9106
9181
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
9107
9182
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
9183
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
9184
|
+
text: z.ZodString;
|
|
9185
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
9186
|
+
}, z.core.$strip>>;
|
|
9108
9187
|
state: z.ZodLiteral<"loading">;
|
|
9109
9188
|
}, z.core.$strip>,
|
|
9110
9189
|
z.ZodObject<{
|
|
@@ -9241,6 +9320,10 @@ export declare const chatConfigSchema: z.ZodObject<{
|
|
|
9241
9320
|
]>>;
|
|
9242
9321
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
9243
9322
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
9323
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
9324
|
+
text: z.ZodString;
|
|
9325
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
9326
|
+
}, z.core.$strip>>;
|
|
9244
9327
|
state: z.ZodEnum<{
|
|
9245
9328
|
streaming: "streaming";
|
|
9246
9329
|
done: "done";
|
|
@@ -9455,6 +9538,10 @@ export declare const chatConfigSchema: z.ZodObject<{
|
|
|
9455
9538
|
]>>;
|
|
9456
9539
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
9457
9540
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
9541
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
9542
|
+
text: z.ZodString;
|
|
9543
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
9544
|
+
}, z.core.$strip>>;
|
|
9458
9545
|
state: z.ZodLiteral<"loading">;
|
|
9459
9546
|
}, z.core.$strip>,
|
|
9460
9547
|
z.ZodObject<{
|
|
@@ -9591,6 +9678,10 @@ export declare const chatConfigSchema: z.ZodObject<{
|
|
|
9591
9678
|
]>>;
|
|
9592
9679
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
9593
9680
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
9681
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
9682
|
+
text: z.ZodString;
|
|
9683
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
9684
|
+
}, z.core.$strip>>;
|
|
9594
9685
|
state: z.ZodEnum<{
|
|
9595
9686
|
streaming: "streaming";
|
|
9596
9687
|
done: "done";
|
|
@@ -9804,6 +9895,10 @@ export declare const chatConfigSchema: z.ZodObject<{
|
|
|
9804
9895
|
]>>;
|
|
9805
9896
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
9806
9897
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
9898
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
9899
|
+
text: z.ZodString;
|
|
9900
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
9901
|
+
}, z.core.$strip>>;
|
|
9807
9902
|
state: z.ZodLiteral<"loading">;
|
|
9808
9903
|
}, z.core.$strip>,
|
|
9809
9904
|
z.ZodObject<{
|
|
@@ -9940,6 +10035,10 @@ export declare const chatConfigSchema: z.ZodObject<{
|
|
|
9940
10035
|
]>>;
|
|
9941
10036
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
9942
10037
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
10038
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
10039
|
+
text: z.ZodString;
|
|
10040
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
10041
|
+
}, z.core.$strip>>;
|
|
9943
10042
|
state: z.ZodEnum<{
|
|
9944
10043
|
streaming: "streaming";
|
|
9945
10044
|
done: "done";
|
|
@@ -10155,6 +10254,10 @@ export declare const chatConfigSchema: z.ZodObject<{
|
|
|
10155
10254
|
]>>;
|
|
10156
10255
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
10157
10256
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
10257
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
10258
|
+
text: z.ZodString;
|
|
10259
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
10260
|
+
}, z.core.$strip>>;
|
|
10158
10261
|
state: z.ZodLiteral<"loading">;
|
|
10159
10262
|
}, z.core.$strip>,
|
|
10160
10263
|
z.ZodObject<{
|
|
@@ -10291,6 +10394,10 @@ export declare const chatConfigSchema: z.ZodObject<{
|
|
|
10291
10394
|
]>>;
|
|
10292
10395
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
10293
10396
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
10397
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
10398
|
+
text: z.ZodString;
|
|
10399
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
10400
|
+
}, z.core.$strip>>;
|
|
10294
10401
|
state: z.ZodEnum<{
|
|
10295
10402
|
streaming: "streaming";
|
|
10296
10403
|
done: "done";
|
|
@@ -10504,6 +10611,10 @@ export declare const chatConfigSchema: z.ZodObject<{
|
|
|
10504
10611
|
]>>;
|
|
10505
10612
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
10506
10613
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
10614
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
10615
|
+
text: z.ZodString;
|
|
10616
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
10617
|
+
}, z.core.$strip>>;
|
|
10507
10618
|
state: z.ZodLiteral<"loading">;
|
|
10508
10619
|
}, z.core.$strip>,
|
|
10509
10620
|
z.ZodObject<{
|
|
@@ -10640,6 +10751,10 @@ export declare const chatConfigSchema: z.ZodObject<{
|
|
|
10640
10751
|
]>>;
|
|
10641
10752
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
10642
10753
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
10754
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
10755
|
+
text: z.ZodString;
|
|
10756
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
10757
|
+
}, z.core.$strip>>;
|
|
10643
10758
|
state: z.ZodEnum<{
|
|
10644
10759
|
streaming: "streaming";
|
|
10645
10760
|
done: "done";
|
|
@@ -11772,6 +11887,10 @@ export declare const chatConfigSchemaWithLegacyThemeName: z.ZodIntersection<z.Zo
|
|
|
11772
11887
|
]>>;
|
|
11773
11888
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
11774
11889
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
11890
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
11891
|
+
text: z.ZodString;
|
|
11892
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
11893
|
+
}, z.core.$strip>>;
|
|
11775
11894
|
state: z.ZodLiteral<"loading">;
|
|
11776
11895
|
}, z.core.$strip>,
|
|
11777
11896
|
z.ZodObject<{
|
|
@@ -11908,6 +12027,10 @@ export declare const chatConfigSchemaWithLegacyThemeName: z.ZodIntersection<z.Zo
|
|
|
11908
12027
|
]>>;
|
|
11909
12028
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
11910
12029
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
12030
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
12031
|
+
text: z.ZodString;
|
|
12032
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
12033
|
+
}, z.core.$strip>>;
|
|
11911
12034
|
state: z.ZodEnum<{
|
|
11912
12035
|
streaming: "streaming";
|
|
11913
12036
|
done: "done";
|
|
@@ -12122,6 +12245,10 @@ export declare const chatConfigSchemaWithLegacyThemeName: z.ZodIntersection<z.Zo
|
|
|
12122
12245
|
]>>;
|
|
12123
12246
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
12124
12247
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
12248
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
12249
|
+
text: z.ZodString;
|
|
12250
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
12251
|
+
}, z.core.$strip>>;
|
|
12125
12252
|
state: z.ZodLiteral<"loading">;
|
|
12126
12253
|
}, z.core.$strip>,
|
|
12127
12254
|
z.ZodObject<{
|
|
@@ -12258,6 +12385,10 @@ export declare const chatConfigSchemaWithLegacyThemeName: z.ZodIntersection<z.Zo
|
|
|
12258
12385
|
]>>;
|
|
12259
12386
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
12260
12387
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
12388
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
12389
|
+
text: z.ZodString;
|
|
12390
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
12391
|
+
}, z.core.$strip>>;
|
|
12261
12392
|
state: z.ZodEnum<{
|
|
12262
12393
|
streaming: "streaming";
|
|
12263
12394
|
done: "done";
|
|
@@ -12471,6 +12602,10 @@ export declare const chatConfigSchemaWithLegacyThemeName: z.ZodIntersection<z.Zo
|
|
|
12471
12602
|
]>>;
|
|
12472
12603
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
12473
12604
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
12605
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
12606
|
+
text: z.ZodString;
|
|
12607
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
12608
|
+
}, z.core.$strip>>;
|
|
12474
12609
|
state: z.ZodLiteral<"loading">;
|
|
12475
12610
|
}, z.core.$strip>,
|
|
12476
12611
|
z.ZodObject<{
|
|
@@ -12607,6 +12742,10 @@ export declare const chatConfigSchemaWithLegacyThemeName: z.ZodIntersection<z.Zo
|
|
|
12607
12742
|
]>>;
|
|
12608
12743
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
12609
12744
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
12745
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
12746
|
+
text: z.ZodString;
|
|
12747
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
12748
|
+
}, z.core.$strip>>;
|
|
12610
12749
|
state: z.ZodEnum<{
|
|
12611
12750
|
streaming: "streaming";
|
|
12612
12751
|
done: "done";
|
|
@@ -12822,6 +12961,10 @@ export declare const chatConfigSchemaWithLegacyThemeName: z.ZodIntersection<z.Zo
|
|
|
12822
12961
|
]>>;
|
|
12823
12962
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
12824
12963
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
12964
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
12965
|
+
text: z.ZodString;
|
|
12966
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
12967
|
+
}, z.core.$strip>>;
|
|
12825
12968
|
state: z.ZodLiteral<"loading">;
|
|
12826
12969
|
}, z.core.$strip>,
|
|
12827
12970
|
z.ZodObject<{
|
|
@@ -12958,6 +13101,10 @@ export declare const chatConfigSchemaWithLegacyThemeName: z.ZodIntersection<z.Zo
|
|
|
12958
13101
|
]>>;
|
|
12959
13102
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
12960
13103
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
13104
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
13105
|
+
text: z.ZodString;
|
|
13106
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
13107
|
+
}, z.core.$strip>>;
|
|
12961
13108
|
state: z.ZodEnum<{
|
|
12962
13109
|
streaming: "streaming";
|
|
12963
13110
|
done: "done";
|
|
@@ -13171,6 +13318,10 @@ export declare const chatConfigSchemaWithLegacyThemeName: z.ZodIntersection<z.Zo
|
|
|
13171
13318
|
]>>;
|
|
13172
13319
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
13173
13320
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
13321
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
13322
|
+
text: z.ZodString;
|
|
13323
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
13324
|
+
}, z.core.$strip>>;
|
|
13174
13325
|
state: z.ZodLiteral<"loading">;
|
|
13175
13326
|
}, z.core.$strip>,
|
|
13176
13327
|
z.ZodObject<{
|
|
@@ -13307,6 +13458,10 @@ export declare const chatConfigSchemaWithLegacyThemeName: z.ZodIntersection<z.Zo
|
|
|
13307
13458
|
]>>;
|
|
13308
13459
|
retrievalQuestion: z.ZodOptional<z.ZodString>;
|
|
13309
13460
|
noFeedback: z.ZodOptional<z.ZodBoolean>;
|
|
13461
|
+
preAnswerNotice: z.ZodOptional<z.ZodObject<{
|
|
13462
|
+
text: z.ZodString;
|
|
13463
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
13464
|
+
}, z.core.$strip>>;
|
|
13310
13465
|
state: z.ZodEnum<{
|
|
13311
13466
|
streaming: "streaming";
|
|
13312
13467
|
done: "done";
|
package/index.js
CHANGED
|
@@ -3589,6 +3589,9 @@ class ChatResultBuilder {
|
|
|
3589
3589
|
retrievalQuestion: question
|
|
3590
3590
|
}));
|
|
3591
3591
|
}
|
|
3592
|
+
setPreAnswerNotice(preAnswerNotice) {
|
|
3593
|
+
this.store.update((current) => ({ ...current, preAnswerNotice }));
|
|
3594
|
+
}
|
|
3592
3595
|
setNoFeedback() {
|
|
3593
3596
|
this.store.update((current) => ({
|
|
3594
3597
|
...current,
|
|
@@ -8306,6 +8309,10 @@ var serverErrorSchema = _enum([
|
|
|
8306
8309
|
"aborted"
|
|
8307
8310
|
]);
|
|
8308
8311
|
var chatErrorsSchema = union([serverErrorSchema, literal("sse-error"), literal("client-error"), literal("unexpected-call")]);
|
|
8312
|
+
var preAnswerNoticeSchema = object({
|
|
8313
|
+
text: string2(),
|
|
8314
|
+
lang: string2().optional()
|
|
8315
|
+
});
|
|
8309
8316
|
var botMessageBaseSchema = object({
|
|
8310
8317
|
type: literal("bot"),
|
|
8311
8318
|
time: string2(),
|
|
@@ -8318,7 +8325,8 @@ var botMessageBaseSchema = object({
|
|
|
8318
8325
|
references: chatReferencesSchema,
|
|
8319
8326
|
errors: array(chatErrorsSchema),
|
|
8320
8327
|
retrievalQuestion: string2().optional(),
|
|
8321
|
-
noFeedback: boolean2().optional()
|
|
8328
|
+
noFeedback: boolean2().optional(),
|
|
8329
|
+
preAnswerNotice: preAnswerNoticeSchema.optional()
|
|
8322
8330
|
});
|
|
8323
8331
|
var chatMessageBotStreamingSchema = botMessageBaseSchema.extend({
|
|
8324
8332
|
state: _enum(["streaming", "done"])
|
|
@@ -9579,6 +9587,11 @@ class LiipGPTClientPrimitive {
|
|
|
9579
9587
|
case "no-feedback":
|
|
9580
9588
|
typingQueue.runAfterTyping(() => chatResultBuilder.setNoFeedback());
|
|
9581
9589
|
break;
|
|
9590
|
+
case "pre-answer-notice":
|
|
9591
|
+
if (!data.text?.trim())
|
|
9592
|
+
break;
|
|
9593
|
+
chatResultBuilder.setPreAnswerNotice({ text: data.text, lang: data.lang || undefined });
|
|
9594
|
+
break;
|
|
9582
9595
|
case "component":
|
|
9583
9596
|
typingQueue.runWithWarmup(() => options.onEmbed?.(data));
|
|
9584
9597
|
break;
|