DVHttpAIAdapter class abstract

Implemented types

Constructors

DVHttpAIAdapter({required Uri baseUrl, required String apiKey, required String model, required String embeddingModel, required String transcriptionModel, required int maxOutputTokens, required DVAIHttpSend send})
const

Properties

apiKey → String
final
authHeaders → Map<String, String>
Headers applied to every JSON request for this provider.
no setter
baseUrl → Uri
final
embeddingModel → String
final
hashCode → int
The hash code for this object.
no setterinherited
maxAgentIterations → int
Upper bound on model turns in a native tool-calling loop. Reaching it is an error, not a silent truncation.
no setter
maxOutputTokens → int
final
model → String
final
providerName → String
Identifier reported in errors and passed through to generated logs.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
send → DVAIHttpSend
final
transcriptionModel → String
final

Methods

agentDidNotFinish() → Never
agentPrompt(DVAIAgentRequest request) → String
agentTools(DVAIAgentRequest request) → List<DVAIToolDefinition>
Registered definitions for the tools this request allows.
chat(String prompt, {String provider = 'gemini'}) → Future<String>
The provider argument on chat is a caller hint retained for source compatibility; the configured adapter decides which service is used.
override
decodeJsonResponse(DVAIHttpResponse response) → Map<String, Object?>
decodeToolInput(Object? raw) → DVJsonObject
embed(String text) → Future<List<double>>
inherited
endpoint(String path, [Map<String, String> query = const {}]) → Uri
invokeAgentTool(DVAIToolDefinition tool, DVJsonObject input) → Future<({bool isError, DVJsonValue value})>
Runs one registered tool, converting a thrown handler error into a value the model can read and recover from.
malformed(String description, [String? body]) → Never
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parseStructuredText(String text) → DVJsonObject
Providers return structured output as a JSON document inside a text field; this parses that document into Dartvel's typed value tree.
postJson(Uri url, Map<String, Object?> body) → Future<Map<String, Object?>>
readDoubles(List<Object?> source, String description) → List<double>
readList(Map<String, Object?> source, String key) → List<Object?>
readMap(Map<String, Object?> source, String key) → Map<String, Object?>
readString(Map<String, Object?> source, String key) → String
runAgent(DVAIAgentRequest request) → Future<DVAIAgentResult>
Fallback used when the provider has no native tool calling, or when the request names no registered tools: run the allowed tools up front and put their results in the prompt.
override
structuredOutput(String prompt, DVJsonObject schema) → Future<DVJsonObject>
inherited
toString() → String
A string representation of this object.
inherited
transcribe(List<int> audioBytes, {String mimeType = 'audio/wav', String language = 'und'}) → Future<DVAITranscript>
inherited
unsupported(String capability) → Never

Operators

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