googleai_dart 1.1.0
googleai_dart: ^1.1.0 copied to clipboard
Unofficial Dart client for the Google AI Gemini Developer API and Vertex AI Gemini API with unified interface.
1.1.0 #
1.0.0 #
Note: This release has breaking changes.
TL;DR: Complete reimplementation with a new architecture, minimal dependencies, unified resource-based API, and full Gemini API coverage. Includes new Files, Batches, Caching, Corpora/RAG, RAG Stores, Dynamic Content, Permissions, Tuned Models, and Prediction (Veo) support.
What's new #
- Unified client for both:
- Google AI Gemini Developer API
- Vertex AI Gemini API
- Complete API coverage: 78 endpoints.
- Files API: upload, list, get, delete, download.
- Generated Files API: list, get, getOperation (video outputs).
- Cached Contents: full CRUD.
- Batch operations: batchGenerateContent, batchEmbedContents, asyncBatchEmbedContent with LRO polling.
- Corpora & RAG: corpus CRUD (Google AI); documents/chunks/query, metadata filters, batch chunk ops (Vertex AI only).
- RAG Stores: documents list/create/get/delete/query + operations.
- Dynamic Content: generate/stream content with dynamic model IDs.
- Permissions: create/list/get/update/delete/transferOwnership for eligible resources.
- Tuned Models: list, get, listOperations, generation APIs.
- Prediction (Veo): predict, predictLongRunning, operation polling, RAI filtering.
- Architecture:
- Interceptor chain (Auth → Logging → Error).
- Authentication: API key, Bearer token, custom OAuth via
AuthProvider. - Retry with exponential backoff + jitter.
- Abortable requests via
abortTrigger(streaming and non-streaming). - SSE streaming parser.
- Central
GoogleAIConfig(timeouts, retry policy, log level, baseUrl).
- Testing:
- 560+ tests covering all endpoints, error branches, streaming/abort flows.
Breaking Changes #
- Resource-based API: Methods reorganized under strongly-typed resources:
client.models.*(generation, streaming, embeddings, tokens, prediction)client.tunedModels.*client.files.*,client.generatedFiles.*client.cachedContents.*client.batches.*client.corpora.*client.ragStores.*
- Parameter rename:
modelId→model. - Configuration: New
GoogleAIConfigwithAuthProviderpattern (API key / bearer / custom OAuth). - Exceptions: Replaced ad-hoc errors with a typed hierarchy:
ApiException,ValidationException,RateLimitException,TimeoutException,AbortedException.
- Dependencies: Removed
fetch_client; now minimal (http,logging).
See MIGRATION.md for step-by-step examples and mapping tables.
0.1.1 #
0.0.4 #
- FEAT: Support generateContent for tuned model in googleai_dart client (#358). (b4641a09)
- FEAT: Support output dimensionality in Google AI Embeddings (#373). (6dcb27d8)
- FEAT: Support updating API key in Google AI client (#357). (b9b808e7)
- FIX: Have the == implementation use Object instead of dynamic (#334). (89f7b0b9)
0.0.3 #
0.0.2 #
- Update a dependency to the latest release.
0.0.1-dev.1 #
- Bootstrap project.