v0.7.2
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
langchain_community
-v0.2.1
langchain_chroma
-v0.2.0+5
langchain_firebase
-v0.1.0+2
langchain_google
-v0.5.1
langchain_mistralai
-v0.2.1
langchain_ollama
-v0.2.2
langchain_openai
-v0.6.2
langchain_pinecone
-v0.1.0+5
langchain_supabase
-v0.1.0+5
chromadb
-v0.2.0+1
googleai_dart
-v0.1.0+1
mistralai_dart
-v0.0.3+2
ollama_dart
-v0.1.1
openai_dart
-v0.3.3
vertex_ai
-v0.1.0+1
langchain
- v0.7.2
- FEAT: Add support for ObjectBoxVectorStore (#438). (81e167a6)
- Check out the ObjectBoxVectorStore documentation
- REFACTOR: Migrate to langchaindart.dev domain (#434). (358f79d6)
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
- FEAT: Add support for ObjectBoxVectorStore (#438). (81e167a6)
- Check out the ObjectBoxVectorStore documentation
langchain_openai
- v0.6.2
anthropic_sdk_dart
- v0.0.1
ollama_dart
- v0.1.1
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
- @alfredobs97 made their first contribution in #433
📣 Check out the #announcements channel in the LangChain.dart Discord server for more details.