class FakeBuiltModelInternal method that handles batching and configuration for a runnable
Filter out large/inappropriate fields from invocation params for tracing metadata.
Create a unique cache key for a specific call to a specific language model.
Get the identifying parameters of the LLM.
Stream chat model events using the new content-block-centric protocol.
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.
Bind tool-like objects to this chat model.
Generates chat based on the input messages.
Generates a prompt based on the input prompt values.
Wraps getLsParams() and always appends ls_integration.
Get the number of tokens in the content.
Get the parameters used to invoke the model
Invokes the chat model with a single input.
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.
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.
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.
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.
A fake chat model for testing, created via fakeModel.
Queue responses with .respond() and .respondWithTools(), then
pass the instance directly wherever a chat model is expected.
Responses are consumed in first-in-first-out order — one per invoke() call.
When all queued responses are consumed, further invocations throw.
Add retry logic to an existing runnable.
Default streaming implementation.