@langchain/core
Advanced tools
Comparing version 0.3.7 to 0.3.8-rc.0
@@ -150,5 +150,6 @@ import { InMemoryCache } from "../caches/base.js"; | ||
constructor({ callbacks, callbackManager, ...params }) { | ||
const { cache, ...rest } = params; | ||
super({ | ||
callbacks: callbacks ?? callbackManager, | ||
...params, | ||
...rest, | ||
}); | ||
@@ -177,6 +178,6 @@ /** | ||
}); | ||
if (typeof params.cache === "object") { | ||
this.cache = params.cache; | ||
if (typeof cache === "object") { | ||
this.cache = cache; | ||
} | ||
else if (params.cache) { | ||
else if (cache) { | ||
this.cache = InMemoryCache.global(); | ||
@@ -183,0 +184,0 @@ } |
@@ -482,3 +482,3 @@ import { z } from "zod"; | ||
}); | ||
get steps(): Runnable<any, any, RunnableConfig>[]; | ||
get steps(): Runnable<any, any, RunnableConfig<Record<string, any>>>[]; | ||
invoke(input: RunInput, options?: RunnableConfig): Promise<RunOutput>; | ||
@@ -597,3 +597,3 @@ batch(inputs: RunInput[], options?: Partial<RunnableConfig> | Partial<RunnableConfig>[], batchOptions?: RunnableBatchOptions & { | ||
}); | ||
runnables(): Generator<Runnable<RunInput, RunOutput, RunnableConfig>, void, unknown>; | ||
runnables(): Generator<Runnable<RunInput, RunOutput, RunnableConfig<Record<string, any>>>, void, unknown>; | ||
invoke(input: RunInput, options?: Partial<RunnableConfig>): Promise<RunOutput>; | ||
@@ -600,0 +600,0 @@ _streamIterator(input: RunInput, options?: Partial<RunnableConfig> | undefined): AsyncGenerator<RunOutput>; |
@@ -22,3 +22,3 @@ import type { RunnableInterface, RunnableIOSchema, Node, Edge } from "./types.js"; | ||
id: string; | ||
data: RunnableIOSchema | RunnableInterface<any, any, import("./types.js").RunnableConfig>; | ||
data: RunnableIOSchema | RunnableInterface<any, any, import("./types.js").RunnableConfig<Record<string, any>>>; | ||
} | undefined)[]; | ||
@@ -25,0 +25,0 @@ trimFirstNode(): void; |
@@ -90,4 +90,4 @@ import { BaseChatMessageHistory, BaseListChatMessageHistory } from "../chat_history.js"; | ||
_exitHistory(run: Run, config: RunnableConfig): Promise<void>; | ||
_mergeConfig(...configs: Array<RunnableConfig | undefined>): Promise<Partial<RunnableConfig>>; | ||
_mergeConfig(...configs: Array<RunnableConfig | undefined>): Promise<Partial<RunnableConfig<Record<string, any>>>>; | ||
} | ||
export {}; |
@@ -46,3 +46,3 @@ import type { z } from "zod"; | ||
} | ||
export interface RunnableConfig extends BaseCallbackConfig { | ||
export interface RunnableConfig<ConfigurableFieldType extends Record<string, any> = Record<string, any>> extends BaseCallbackConfig { | ||
/** | ||
@@ -52,3 +52,3 @@ * Runtime values for attributes previously made configurable on this Runnable, | ||
*/ | ||
configurable?: Record<string, any>; | ||
configurable?: ConfigurableFieldType; | ||
/** | ||
@@ -55,0 +55,0 @@ * Maximum number of times a call can recurse. If not provided, defaults to 25. |
@@ -119,2 +119,3 @@ import { z } from "zod"; | ||
static lc_name(): string; | ||
lc_serializable: boolean; | ||
responses: string[]; | ||
@@ -124,3 +125,3 @@ i: number; | ||
emitCustomEvent: boolean; | ||
constructor({ responses, sleep, emitCustomEvent }: FakeChatInput); | ||
constructor(params: FakeChatInput); | ||
_combineLLMOutput(): never[]; | ||
@@ -127,0 +128,0 @@ _llmType(): string; |
@@ -302,4 +302,10 @@ /* eslint-disable no-promise-executor-return */ | ||
} | ||
constructor({ responses, sleep, emitCustomEvent }) { | ||
super({}); | ||
constructor(params) { | ||
super(params); | ||
Object.defineProperty(this, "lc_serializable", { | ||
enumerable: true, | ||
configurable: true, | ||
writable: true, | ||
value: true | ||
}); | ||
Object.defineProperty(this, "responses", { | ||
@@ -329,2 +335,3 @@ enumerable: true, | ||
}); | ||
const { responses, sleep, emitCustomEvent } = params; | ||
this.responses = responses; | ||
@@ -331,0 +338,0 @@ this.sleep = sleep; |
{ | ||
"name": "@langchain/core", | ||
"version": "0.3.7", | ||
"version": "0.3.8-rc.0", | ||
"description": "Core LangChain.js abstractions and schemas", | ||
@@ -5,0 +5,0 @@ "type": "module", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2193834
54958