dartantic_ai 0.5.0
dartantic_ai: ^0.5.0 copied to clipboard
A Dart library for easily interacting with LLMs in a typed manner.
0.5.0 #
- Embedding generation: Add methods to generate vector embeddings for text:
Future<Float64List> createEmbedding(String text, {EmbeddingType type})
- Introduce
EmbeddingType
enum (document, query). Agent.cosineSimilarity()
static method for comparing embeddings.- Updated
main.dart
with examples for embedding generation and similarity checks. - Updated
main.dart
with examples for streaming, multi-turn chat, and provider switching from the previous release (which I forgot to do in that release!)
0.4.0 #
- Streaming responses via
Agent.runStream
and related methods. - Multi-turn chat support
- Provider switching: seamlessly alternate between multiple providers in a single conversation, with full context and tool call/result compatibility.
0.3.0 #
- added dotprompt_dart package
support via
Agent.runPrompt(DotPrompt prompt)
- expanded model naming to include "providerName", "providerName:model" or "providerName/model", e.g. "openai" or "googleai/gemini-2.0-flash"
- move types specified by
Map<String, dynamic>
to aJsonSchema
object; addedtoMap()
extension method toJsonSchema
andtoSchema
toMap<String, dynamic>
to make going back and forth more convenient. - move the provider argument to
Agent.provider
as the most flexible case, but also the less common one.Agent()
will contine to take a model string.
0.2.0 #
- Define tools and their inputs/outputs easily
- Automatically generate LLM-specific tool/output schemas
- Allow for a model descriptor string that just contains a family name so that the provider can choose the default model.
0.1.0 #
- Multi-Model Support (just Gemini and OpenAI models so far)
- Create agents from model strings (e.g.
openai:gpt-4o
) or typed providers (e.g.GoogleProvider()
) - Automatically check environment for API key if none is provided (not web compatible)
- String output via
Agent.run
- Typed output via
Agent.runFor
0.0.1 #
- Initial version.