VanturaClient class

Client for interacting with the Vantura AI API.

Handles authentication, request building, and response parsing for chat completions.

Constructors

VanturaClient({required String apiKey, required String baseUrl, required String model, double? temperature, int? maxCompletionTokens, double? topP, bool? stream, String? reasoningEffort, dynamic stop, Client? httpClient})
Creates an VanturaClient with the specified configuration.

Properties

apiKey String
API key for authentication.
final
baseUrl String
Base URL of the API endpoint.
final
hashCode int
The hash code for this object.
no setterinherited
maxCompletionTokens int?
Default maximum completion tokens.
final
model String
Default model to use for requests.
final
reasoningEffort String?
Default reasoning effort.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stop → dynamic
Default stop sequences.
final
stream bool?
Default stream flag.
final
temperature double?
Default temperature for responses.
final
topP double?
Default top-p sampling parameter.
final

Methods

close() → void
Closes the shared HTTP client.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sendChatRequest(List<Map<String, dynamic>> messages, List<Map<String, dynamic>>? tools, {double? temperature, int? maxCompletionTokens, double? topP, bool? stream, String? reasoningEffort, dynamic stop, CancellationToken? cancellationToken}) Future<Map<String, dynamic>>
Sends a chat request to the API.
sendStreamingChatRequest(List<Map<String, dynamic>> messages, List<Map<String, dynamic>>? tools, {double? temperature, int? maxCompletionTokens, double? topP, String? reasoningEffort, dynamic stop, CancellationToken? cancellationToken}) Stream<Map<String, dynamic>>
Sends a streaming chat request to the API.
toString() String
A string representation of this object.
inherited

Operators

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