@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
- yield revive(JSON.parse(log));
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 { type LogStreamCallbackHandlerInput, type RunLogPatch } from "../tracers/log_stream.js";
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;
@@ -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
- yield revive(JSON.parse(log));
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) {
@@ -1,5 +1,6 @@
1
1
  // @ts-nocheck
2
2
  // Inlined to deal with portability issues
3
+ // Originally from: https://github.com/isaacs/sax-js
3
4
  const initializeSax = function () {
4
5
  const sax = {};
5
6
  sax.parser = function (strict, opt) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/core",
3
- "version": "0.1.25-rc.0",
3
+ "version": "0.1.26",
4
4
  "description": "Core LangChain.js abstractions and schemas",
5
5
  "type": "module",
6
6
  "engines": {