@langchain/core
Advanced tools
Comparing version 0.2.22 to 0.2.23
@@ -70,3 +70,3 @@ import { z } from "zod"; | ||
fallbacks: Runnable<RunInput, RunOutput>[]; | ||
}): RunnableWithFallbacks<RunInput, RunOutput>; | ||
} | Runnable<RunInput, RunOutput>[]): RunnableWithFallbacks<RunInput, RunOutput>; | ||
protected _getOptionsList<O extends CallOptions & { | ||
@@ -572,2 +572,18 @@ runType?: string; | ||
* A Runnable that can fallback to other Runnables if it fails. | ||
* External APIs (e.g., APIs for a language model) may at times experience | ||
* degraded performance or even downtime. | ||
* | ||
* In these cases, it can be useful to have a fallback Runnable that can be | ||
* used in place of the original Runnable (e.g., fallback to another LLM provider). | ||
* | ||
* Fallbacks can be defined at the level of a single Runnable, or at the level | ||
* of a chain of Runnables. Fallbacks are tried in order until one succeeds or | ||
* all fail. | ||
* | ||
* While you can instantiate a `RunnableWithFallbacks` directly, it is usually | ||
* more convenient to use the `withFallbacks` method on an existing Runnable. | ||
* | ||
* When streaming, fallbacks will only be called on failures during the initial | ||
* stream creation. Errors that occur after a stream starts will not fallback | ||
* to the next Runnable. | ||
*/ | ||
@@ -586,2 +602,3 @@ export declare class RunnableWithFallbacks<RunInput, RunOutput> extends Runnable<RunInput, RunOutput> { | ||
invoke(input: RunInput, options?: Partial<RunnableConfig>): Promise<RunOutput>; | ||
_streamIterator(input: RunInput, options?: Partial<RunnableConfig> | undefined): AsyncGenerator<RunOutput>; | ||
batch(inputs: RunInput[], options?: Partial<RunnableConfig> | Partial<RunnableConfig>[], batchOptions?: RunnableBatchOptions & { | ||
@@ -588,0 +605,0 @@ returnExceptions?: false; |
{ | ||
"name": "@langchain/core", | ||
"version": "0.2.22", | ||
"version": "0.2.23", | ||
"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 too big to display
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
2151305
53692