Skip to content

Commit

Permalink
feat(core): Allow generic configurable type to be passed into Runnabl…
Browse files Browse the repository at this point in the history
…eConfig (#6931)
  • Loading branch information
jacoblee93 authored Oct 8, 2024
1 parent f9f1b7f commit ed2850c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions langchain-core/src/runnables/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,16 @@ export interface Node {
metadata?: Record<string, any>;
}

export interface RunnableConfig extends BaseCallbackConfig {
export interface RunnableConfig<
// eslint-disable-next-line @typescript-eslint/no-explicit-any
ConfigurableFieldType extends Record<string, any> = Record<string, any>
> extends BaseCallbackConfig {
/**
* Runtime values for attributes previously made configurable on this Runnable,
* or sub-Runnables.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
configurable?: Record<string, any>;
configurable?: ConfigurableFieldType;

/**
* Maximum number of times a call can recurse. If not provided, defaults to 25.
Expand Down

0 comments on commit ed2850c

Please sign in to comment.