dartvel_ai library

AI: the DV.AI facade plus everything needed to configure and drive it.

Classes

AnthropicDVAIAdapter
Talks to the Anthropic Messages API (POST /v1/messages).
DV
DVAI
DVAIAdapter
DVAIAgentRequest
DVAIAgentResult
DVAIToolDefinition
A registered AI tool: the handler plus the description and JSON Schema a provider needs in order to decide when to call it.
DVAIToolRegistry
DVAITranscript
DVHttpAIAdapter
DVHttpRequest
DVHttpResponse
DVJsonBool
DVJsonCodec
Converts between Dartvel's typed DVJsonValue tree and the plain Object? tree that dart:convert produces and consumes.
DVJsonList
DVJsonMap
DVJsonNull
DVJsonNumber
DVJsonString
DVJsonValue
GeminiDVAIAdapter
Talks to the Gemini generative-language REST API.
LocalDVAIAdapter
Deterministic in-process adapter for development and tests. It never reaches the network, so tests cannot accidentally pass because a provider was unreachable.
OllamaDVAIAdapter
Talks to a local Ollama runtime. The API key is optional and only sent when the runtime is fronted by an authenticating proxy.
OpenAIDVAIAdapter
Talks to the OpenAI REST API. OpenRouterDVAIAdapter reuses this wire format against a different host.
OpenRouterDVAIAdapter
OpenRouter exposes the OpenAI chat-completions wire format under its own host. It does not serve embeddings or transcription.

Functions

dvSendHttpRequest(DVHttpRequest request) Future<DVHttpResponse>
Sends request, walking its protocol chain until one succeeds.

Exceptions / Errors

DVAIProviderException
Thrown when a provider rejects a request or returns a payload Dartvel cannot interpret. Provider failures are never swallowed into empty results.