AiClient class abstract

Implementers

Constructors

AiClient({String? apiUrl, String? apiKey, String? model, Duration? delay = const Duration(milliseconds: 300), Logger? logger})

Properties

delay Duration?
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

logError(dynamic error) → void
Logs an error that occurred during a request.
logRequest(Map<String, dynamic> data) → void
Logs a request being sent to the AI provider.
logResponse(Map<String, dynamic> response) → void
Logs a response received from the AI provider.
makeToolCalls({required List<Tool> tools, required List toolCalls}) Future<List<ToolResultMessage>>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
query({required Message message, List<Message> history = const [], String? system, String? model, Duration? delay, List<Context>? contexts, List<Tool> tools = const []}) Future<AiClientResponse>
simpleQuery({String? model, List<Message> history = const [], Duration? delay, required String prompt, String? system, String role = 'user', List<Context>? contexts}) Future<String>
toString() String
A string representation of this object.
inherited

Operators

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