Interface that defines the shape of a LangChain structured tool.
A structured tool is a tool that uses a schema to define the structure of the arguments that the LLM generates as part of its ToolCall.
interface StructuredToolInterfaceRunnableInterface<StructuredToolCallInput<SchemaT, SchemaInputT>, ToolOutputT | ToolMessage>A description of what the function does, used by the model to choose when and how to call the function.
A path to the module that contains the class, eg. ["langchain", "llms"] Usually should be the same as the entrypoint the class is exported from.
Whether to return the tool's output directly.
Setting this to true means that after the tool is called, an agent should stop looping.
Default implementation of batch, which calls invoke N times. Subclasses should override this method if they can batch more efficiently.
Method to invoke the document transformation. This method calls the transformDocuments method with the provided input.
Stream output in chunks.
Default implementation of transform, which buffers input and then calls stream. Subclasses should override this method if they can start producing output while input is still being generated.
Default implementation of batch, which calls invoke N times.
Method to invoke the document transformation. This method calls the
Stream output in chunks.
Default implementation of transform, which buffers input and then calls stream.