@langchain/core 0.1.25-rc.0 → 0.1.26
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.
|
@@ -371,7 +371,8 @@ class RemoteRunnable extends base_js_1.Runnable {
|
|
|
371
371
|
}
|
|
372
372
|
const runnableStream = (0, event_source_parse_js_1.convertEventStreamToIterableReadableDataStream)(body);
|
|
373
373
|
for await (const log of runnableStream) {
|
|
374
|
-
|
|
374
|
+
const chunk = revive(JSON.parse(log));
|
|
375
|
+
yield new log_stream_js_1.RunLogPatch({ ops: chunk.ops });
|
|
375
376
|
}
|
|
376
377
|
}
|
|
377
378
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Runnable, RunnableBatchOptions } from "./base.js";
|
|
2
2
|
import type { RunnableConfig } from "./config.js";
|
|
3
3
|
import { CallbackManagerForChainRun } from "../callbacks/manager.js";
|
|
4
|
-
import {
|
|
4
|
+
import { RunLogPatch, type LogStreamCallbackHandlerInput } from "../tracers/log_stream.js";
|
|
5
5
|
import { IterableReadableStream } from "../utils/stream.js";
|
|
6
6
|
type RemoteRunnableOptions = {
|
|
7
7
|
timeout?: number;
|
package/dist/runnables/remote.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Runnable } from "./base.js";
|
|
2
2
|
import { Document } from "../documents/index.js";
|
|
3
3
|
import { ChatPromptValue, StringPromptValue } from "../prompt_values.js";
|
|
4
|
-
import { LogStreamCallbackHandler, } from "../tracers/log_stream.js";
|
|
4
|
+
import { LogStreamCallbackHandler, RunLogPatch, } from "../tracers/log_stream.js";
|
|
5
5
|
import { AIMessage, AIMessageChunk, ChatMessage, ChatMessageChunk, FunctionMessage, FunctionMessageChunk, HumanMessage, HumanMessageChunk, SystemMessage, SystemMessageChunk, ToolMessage, ToolMessageChunk, isBaseMessage, } from "../messages/index.js";
|
|
6
6
|
import { GenerationChunk, ChatGenerationChunk, RUN_KEY } from "../outputs.js";
|
|
7
7
|
import { getBytes, getLines, getMessages, convertEventStreamToIterableReadableDataStream, } from "../utils/event_source_parse.js";
|
|
@@ -368,7 +368,8 @@ export class RemoteRunnable extends Runnable {
|
|
|
368
368
|
}
|
|
369
369
|
const runnableStream = convertEventStreamToIterableReadableDataStream(body);
|
|
370
370
|
for await (const log of runnableStream) {
|
|
371
|
-
|
|
371
|
+
const chunk = revive(JSON.parse(log));
|
|
372
|
+
yield new RunLogPatch({ ops: chunk.ops });
|
|
372
373
|
}
|
|
373
374
|
}
|
|
374
375
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.sax = void 0;
|
|
5
5
|
// Inlined to deal with portability issues
|
|
6
|
+
// Originally from: https://github.com/isaacs/sax-js
|
|
6
7
|
const initializeSax = function () {
|
|
7
8
|
const sax = {};
|
|
8
9
|
sax.parser = function (strict, opt) {
|
package/dist/utils/sax-js/sax.js
CHANGED