Default implementation of batch, which calls invoke N times. Subclasses should override this method if they can batch more efficiently.
batch(
inputs: StructuredToolCallInput<SchemaT, SchemaInputT>[],
options: Partial<RunnableConfig<Record<string, any>>> | Partial<RunnableConfig<Record<string, any>>>[],
batchOptions: RunnableBatchOptions __type
): Promise<ToolOutputT | ToolMessage<MessageStructure<MessageToolSet>>[]>| Name | Type | Description |
|---|---|---|
inputs* | StructuredToolCallInput<SchemaT, SchemaInputT>[] | Array of inputs to each batch call. |
options | Partial<RunnableConfig<Record<string, any>>> | Partial<RunnableConfig<Record<string, any>>>[] | Either a single call options object to apply to each batch call or an array for each call. |
batchOptions | RunnableBatchOptions & __type |