Skip to content

v0.7.2

Latest
Compare
Choose a tag to compare
@davidmigloz davidmigloz released this 01 Jun 09:02
· 25 commits to main since this release
b93c25d

2024-06-01

What's New?

🔥 ObjectBox Vector Search

We are excited to announce that Langchain.dart now supports ObjectBox as a vector store!

ObjectBox is an embedded database that runs inside your application. With the release of v4.0.0, it now supports storing and querying vectors. Leveraging the HNSW algorithm, ObjectBox provides fast and efficient vector search without keeping all the vectors in-memory, making it the first scalable on-device vector database for Dart/Flutter applications.

Check out the ObjectBoxVectorStore documentation to learn how to use it.

final vectorStore = ObjectBoxVectorStore(
  embeddings: OllamaEmbeddings(model: 'jina/jina-embeddings-v2-small-en'),
  dimensions: 512,
);

We have also introduced a new example showcasing a fully local Retrieval Augmented Generation (RAG) pipeline with Llama 3, utilizing ObjectBox and Ollama:

✨ Runnable.close

You now have the ability to close any resources associated with a Runnable by invoking the close method. For instance, if you have a chain like:

final chain = promptTemplate
    .pipe(model)
    .pipe(outputParser);
// ...
chain.close();

Calling close() will propagate the close() call to each Runnable instance within the chain. In this example, it won't affect promptTemplate and outputParser as they have no associated resources to close, but it will effectively close the HTTP client of the model.

🚚 Documentation Migration: langchaindart.dev

We have successfully migrated our documentation to a new domain: langchaindart.dev.

🛠️ Bugfixes

  • Errors are now correctly propagated to the stream listener when streaming a chain that uses a StringOutputParser.
  • The Ollama client now properly handles buffered stream responses, such as when utilizing Cloudflare Tunnels.

🆕 anthropic_sdk_dart client

We are working on integrating Anthropic into LangChain.dart. As part of this effort, we have released a new client for the Anthropic API: anthropic_sdk_dart. In the next release, we will add support for tool calling and further integrate it into LangChain.dart.

Changes


New packages:

Packages with other changes:


langchain - v0.7.2

langchain_core - v0.3.2

  • FEAT: Add Runnable.close() to close any resources associated with it (#439). (4e08cced)
  • FIX: Stream errors are not propagated by StringOutputParser (#440). (496b11cc)

langchain_community - v0.2.1

langchain_openai - v0.6.2

  • DOCS: Document tool calling with OpenRouter (#437). (47986592)

anthropic_sdk_dart - v0.0.1

  • FEAT: Implement anthropic_sdk_dart, a Dart client for Anthropic API (#433). (e5412b)

ollama_dart - v0.1.1

  • FEAT: Support buffered stream responses (#445). (ce2ef30c)

openai_dart - v0.3.3

  • FEAT: Support FastChat OpenAI-compatible API (#444). (ddaf1f69)
  • FIX: Make vector store name optional (#436). (29a46c7f)
  • FIX: Fix deserialization of sealed classes (#435). (7b9cf223)

New Contributors


📣 Check out the #announcements channel in the LangChain.dart Discord server for more details.