class FakeLLMA path to the module that contains the class, eg. ["langchain", "llms"]
Internal method that handles batching and configuration for a runnable
Run the LLM on the given prompt and input.
Filter out large/inappropriate fields from invocation params for tracing metadata.
Run the LLM on the given prompts and input.
Create a unique cache key for a specific call to a specific language model.
Get the identifying parameters of the LLM.
Return the string type key uniquely identifying this class of LLM.
Default streaming implementation.
Helper method to transform an Iterator of Input values into an Iterator of
Assigns new fields to the dict output of this runnable. Returns a new runnable.
Convert a runnable to a tool. Return a new instance of RunnableToolLike
Default implementation of batch, which calls invoke N times.
Run the LLM on the given prompts and input, handling caching.
This method takes prompt values, options, and callbacks, and generates
Get the number of tokens in the content.
Get the parameters used to invoke the model
This method takes an input and options, and returns a string. It
Pick keys from the dict output of this runnable. Returns a new runnable.
Create a new runnable sequence that runs each individual runnable in series,
Stream output in chunks.
Generate a stream of events emitted by the internal steps of the runnable.
Stream all output from a runnable, as reported to the callback system.
Default implementation of transform, which buffers input and then calls stream.
Bind config to a Runnable, returning a new Runnable.
Create a new runnable from the current one that will try invoking
Bind lifecycle listeners to a Runnable, returning a new Runnable.
Add retry logic to an existing runnable.
Model wrapper that returns outputs formatted to match the given schema.
The name of the serializable. Override to provide an alias or
The async caller should be used by subclasses to make any async calls,
A path to the module that contains the class, eg. ["langchain", "llms"]
Whether to print out response text.
The async caller should be used by subclasses to make any async calls,
A path to the module that contains the class, eg. ["langchain", "llms"]
Whether to print out response text.
Internal method that handles batching and configuration for a runnable
Filter out large/inappropriate fields from invocation params for tracing metadata.
A path to the module that contains the class, eg. ["langchain", "llms"]
Whether to print out response text.
A path to the module that contains the class, eg. ["langchain", "llms"]
Internal method that handles batching and configuration for a runnable
A path to the module that contains the class, eg. ["langchain", "llms"]
The async caller should be used by subclasses to make any async calls, which will thus benefit from the concurrency and retry logic.
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 print out response text.
LLM class that provides a simpler interface to subclass than BaseLLM.
Requires only implementing a simpler _call method instead of _generate.
Add retry logic to an existing runnable.
Default streaming implementation.