ToolCallingModel class abstract interface

A model that can be given Tools.

Separate from ChatModel so adding tool support broke no existing implementation: a plain ChatModel still only has to answer with text.

Implemented types
Implementers

Properties

hashCode → int
The hash code for this object.
no setterinherited
model → String
Model identifier sent to the provider.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() → void
Releases network resources.
inherited
complete(List<ChatMessage> messages, {String? system, int? maxTokens}) → Future<ChatResponse>
Generates a complete response to messages.
inherited
completeWithTools(List<ChatMessage> messages, {String? system, int? maxTokens, List<Tool> tools = const []}) → Future<ChatResponse>
Like ChatModel.complete, but the model may answer with ChatResponse.toolCalls instead of (or as well as) text.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
stream(List<ChatMessage> messages, {String? system, int? maxTokens}) → Stream<String>
Streams the response to messages as text deltas.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited