ChatClientBuilder class
Builds a pipeline of chat client middleware.
The pipeline is composed by calling use one or more times, then calling build to produce the final ChatClient. Middleware factories are applied in reverse order so that the first call to use produces the outermost wrapper.
Constructors
- ChatClientBuilder(ChatClient innerClient)
-
Creates a new ChatClientBuilder wrapping
innerClient. - ChatClientBuilder.fromFactory(InnerClientFactory innerClientFactory)
-
Creates a new ChatClientBuilder from a factory function.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
[ServiceProvider? services]) → ChatClient - Builds the pipeline and returns the outermost ChatClient.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
use(
ChatClient factory(ChatClient)) → ChatClientBuilder - Adds a middleware factory to the pipeline.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited