FunctionInvocationContext class

Provides context for a function invocation within a chat client pipeline.

This is used by FunctionInvokingChatClient to provide information about the current invocation to filters and handlers.

Constructors

FunctionInvocationContext({required ChatMessage message, required FunctionCallContent callContent, required AIFunction function_, required int iteration, required int functionCallIndex, required int functionCount})
Creates a new FunctionInvocationContext.

Properties

callContent FunctionCallContent
The function call content from the model.
final
exception Object?
The exception that occurred during invocation, if any.
getter/setter pair
function_ AIFunction
The AIFunction being invoked.
final
functionCallIndex int
The index of this function call within the current iteration.
final
functionCount int
The total number of function calls in the current iteration.
final
hashCode int
The hash code for this object.
no setterinherited
iteration int
The current iteration of the function-calling loop.
final
message ChatMessage
The chat message containing the function call.
final
result Object?
The result of the function invocation.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
terminate bool
Whether to terminate the function invocation loop after this call.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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