@librechat/agents 4.2.2 → 4.2.3
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/cjs/stream.cjs +1 -0
- package/dist/cjs/stream.cjs.map +1 -1
- package/dist/cjs/summarization/node.cjs +72 -47
- package/dist/cjs/summarization/node.cjs.map +1 -1
- package/dist/esm/stream.mjs +1 -0
- package/dist/esm/stream.mjs.map +1 -1
- package/dist/esm/summarization/node.mjs +73 -49
- package/dist/esm/summarization/node.mjs.map +1 -1
- package/dist/types/summarization/node.d.ts +21 -3
- package/dist/types/types/stream.d.ts +2 -0
- package/dist/types/types/summarize.d.ts +8 -0
- package/package.json +6 -5
- package/src/stream.ts +22 -8
- package/src/summarization/node.ts +508 -238
- package/src/types/stream.ts +2 -0
- package/src/types/summarize.ts +8 -0
package/src/types/stream.ts
CHANGED
|
@@ -557,6 +557,8 @@ export type TPayload = Array<Partial<TMessage>>;
|
|
|
557
557
|
|
|
558
558
|
export type SummarizeDeltaData = {
|
|
559
559
|
id: string;
|
|
560
|
+
/** Discard what the step has streamed so far before applying `delta`. */
|
|
561
|
+
reset?: boolean;
|
|
560
562
|
delta: {
|
|
561
563
|
summary: SummaryContentBlock;
|
|
562
564
|
};
|
package/src/types/summarize.ts
CHANGED
|
@@ -164,6 +164,14 @@ export interface SummarizeStartEvent {
|
|
|
164
164
|
|
|
165
165
|
export interface SummarizeDeltaEvent {
|
|
166
166
|
id: string;
|
|
167
|
+
/**
|
|
168
|
+
* Discard what this step has streamed so far, then apply `delta`. Deltas go
|
|
169
|
+
* out while the provider is still responding, so an attempt that is then
|
|
170
|
+
* abandoned (a retry, a smaller window, a fallback provider, a response with
|
|
171
|
+
* no summary in it) has already published text. The first delta of the next
|
|
172
|
+
* attempt carries this, or a delta with no content when no attempt follows.
|
|
173
|
+
*/
|
|
174
|
+
reset?: boolean;
|
|
167
175
|
delta: {
|
|
168
176
|
summary: SummaryContentBlock;
|
|
169
177
|
};
|