Skip to content

Releases: davidmigloz/langchain_dart

2024-10-31

31 Oct 18:52
d272397

Choose a tag to compare

Changes


Packages with breaking changes:

  • There are no breaking changes in this release.

Packages with other changes:

Packages with dependency updates only:

Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.

  • langchain_openai - v0.7.2+5

openai_dart - v0.4.4

  • FEAT: Add five new voice types to Chat Completions API in openai_dart (#594). (543f2977)

openai_realtime_dart - v0.0.3

  • FEAT: Add five new voice types in openai_realtime_dart and minor improvements (#593). (6d0c8d3f)
  • DOCS: Update openai_realtime_dart README.md. (7e9e1393)

2024-10-29

29 Oct 22:35
c35b869

Choose a tag to compare

What's New?

I haven't announced the last few releases as much as I used to due to lack of time (I should probably automate it), but we've been quietly working on enhancements and new features!

Here's a summary of the latest updates:

๐Ÿ”„ Runnable Retry:

Thanks to @Ganeshsivakumar, you can now effortlessly retry failed runnables.

final chatModel = ChatOpenAI();
final chatModelWithRetry = chatModel.withRetry(maxRetries: 5);
final res = await chatModelWithRetry.invoke(...);

Pro-tip: combine with fallbacks for robustness. For example, retry 5 times and then fallback to another model.

final openAi = ChatOpenAI(...);
final anthropic = ChatAnthropic(...);

final chatModel = openAi
  .withRetry(maxRetries: 5)
  .withFallbacks([anthropic]);

Learn more in the docs.

โœจ langchain_google package:

  • ChatGoogleGenerativeAI now supports code execution
final chatModel = ChatGoogleGenerativeAI(
  apiKey: apiKey,
  defaultOptions: ChatGoogleGenerativeAIOptions(
    model: 'gemini-1.5-flash',
    enableCodeExecution: true,
  ),
);
final res = await chatModel.invoke(
  PromptValue.string(
    'Calculate the fibonacci sequence up to 10 terms. '
        'Return only the last term without explanations.',
  ),
);

final text = res.output.content;
print(text); // 34

final executableCode = res.metadata['executable_code'] as String;
print(executableCode);

final codeExecutionResult = res.metadata['code_execution_result'] as Map<String, dynamic>;
print(codeExecutionResult);
  • GoogleGenerativeAIEmbeddings now supports reduced output dimensionality

โœจ langchain_openai package:

โœจ langchain_community package:

  • ObjectBox integration enhancements: Added deleteWhere functionality and updated SDK to v4.0.3 to fix critical iOS exception.
await vectorStore.deleteWhere(
  ObjectBoxDocumentProps.metadata.contains('cat'),
);

๐Ÿค– Default models updates:

  • ChatAnthropic: Updated to claude-3-5-sonnet-20241022.
  • Ollama and ChatOllama: Updated to llama-3.2.

๐Ÿ†•๐Ÿ”ฅ New Package: openai_realtime_dart

Introducing openai_realtime_dart package, a strongly-typed Dart client for OpenAI Realtime API.

OpenAI recently released a new websocket-based API for low-latency, multi-modal conversational experiences. You can find all the details in the official documentation.

Explore the package.

๐ŸŽฏ openai_dart client:

  • Audio Support: Now available in chat completions (check out the official docs for more details)
final res = await client.createChatCompletion(
  request: CreateChatCompletionRequest(
    model: ChatCompletionModel.model(
      ChatCompletionModels.gpt4oAudioPreview,
    ),
    modalities: [
      ChatCompletionModality.text,
      ChatCompletionModality.audio,
    ],
    audio: ChatCompletionAudioOptions(
      voice: ChatCompletionAudioVoice.alloy,
      format: ChatCompletionAudioFormat.wav,
    ),
    messages: [
      ChatCompletionMessage.user(
        content: ChatCompletionUserMessageContent.string(
          'Is a golden retriever a good family dog?',
        ),
      ),
    ],
  ),
);
final choice = res.choices.first;
final audio = choice.message.audio;
print(audio?.id);
print(audio?.expiresAt);
print(audio?.transcript);
print(audio?.data);
  • Support for storing outputs for model distillation and metadata
  • Support for multi-modal moderations
  • Support for maxCompletionTokens and reasoningTokens (for o1-preview and o1-mini models)
  • Support for file search results in assistants API

๐ŸŽฏ anthropic_sdk_dart client:

const request = CreateMessageRequest(
  model: Model.model(Models.claude35Sonnet20241022),
  messages: [
    Message(
      role: MessageRole.user,
      content: MessageContent.text(
        'Save a picture of a cat to my desktop. '
        'After each step, take a screenshot and carefully evaluate if you '
            'have achieved the right outcome. Explicitly show your thinking: '
            '"I have evaluated step X..." If not correct, try again. '
            'Only when you confirm a step was executed correctly should '
            'you move on to the next one.',
      ),
    ),
  ],
  tools: [
    Tool.computerUse(displayWidthPx: 1024, displayHeightPx: 768),
    Tool.textEditor(),
    Tool.bash(),
  ],
  maxTokens: 1024,
);
final res = await client.createMessage(request: request);

Changes


Packages with breaking changes:

Packages with other changes:

Packages with dependency updates only:

Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.

  • langchain_openai - v0.7.2+4

langchain_anthropic - v0.2.0

  • FEAT: Update ChatAnthropic default model to claude-3-5-sonnet-20241022 (#584). (4f0d9cfb)

langchain_community - v0.3.2+2

  • FIX: Update ObjectBox SDK to v4.0.3 to fix StorageException in iOS (#581). (943811a5)

anthropic_sdk_dart - v0.2.0

  • FEAT: Add support for Message Batches in anthropic_sdk_dart (#585). (a41270a0)
  • FEAT: Add claude-3-5-sonnet-20241022 to model catalog in anthropic_sdk_dart (#583). (0cc59e13)
  • BREAKING FEAT: Add support for prompt caching in anthropic_sdk_dart (#587). (79dabaa5)
  • BREAKING FEAT: Add computer use support in anthropic_sdk_dart (#586). (36c4a3e3)
  • DOCS: Update anthropic_sdk_dart readme. (78b7bccf)

openai_dart - v0.4.3

  • FEAT: Add support for audio in chat completions in openai_dart (#577). (0fb058cd)
  • FEAT: Add support for storing outputs for model distillation and metadata in openai_dart (#578). (c9b8bdf4)
  • FEAT: Support multi-modal moderations in openai_dart (#576). (45b9f423)
  • FIX: submitThreadToolOutputsToRunStream not returning any events (#574). (00803ac7)
  • DOCS: Add xAI to list of OpenAI-compatible APIs in openai_dart (#582). (017cb74f)
  • DOCS: Fix openai_dart assistants API outdated documentation (#579). (624c4128)

openai_realtime_dart - v0.0.2

  • FEAT: Make openai_realtime_dart client to strong-typed (#590). (d84e88bf)

New Contributors

Contributors

2024-10-14

29 Oct 22:33
92cc318

Choose a tag to compare

Changes


Packages with breaking changes:

  • There are no breaking changes in this release.

Packages with other changes:

Packages with dependency updates only:

Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.

  • langchain_openai - v0.7.2+3

openai_realtime_dart - v0.0.1+2

  • FIX: Tool calling not working in openai_realtime_dart (#572). (f6b14919)

openai_dart - v0.4.2+2

  • DOCS: Fix typo in openai_dart. (e7ddd558)

New Contributors

2024-10-09

29 Oct 22:31
c61b6d1

Choose a tag to compare

Changes


Packages with breaking changes:

  • There are no breaking changes in this release.

Packages with other changes:


langchain - v0.7.7+1

  • FIX: UUID 'Namespace' can't be assigned to the parameter type 'String?' (#566). (1e93a595)

langchain_chroma - v0.2.1+4

  • FIX: UUID 'Namespace' can't be assigned to the parameter type 'String?' (#566). (1e93a595)

langchain_community - v0.3.2+1

  • FIX: UUID 'Namespace' can't be assigned to the parameter type 'String?' (#566). (1e93a595)

langchain_firebase - v0.2.1+3

  • FIX: UUID 'Namespace' can't be assigned to the parameter type 'String?' (#566). (1e93a595)

langchain_google - v0.6.4+1

  • FIX: UUID 'Namespace' can't be assigned to the parameter type 'String?' (#566). (1e93a595)

langchain_ollama - v0.3.2+1

  • FIX: UUID 'Namespace' can't be assigned to the parameter type 'String?' (#566). (1e93a595)

langchain_openai - v0.7.2+2

  • FIX: UUID 'Namespace' can't be assigned to the parameter type 'String?' (#566). (1e93a595)

langchain_pinecone - v0.1.0+10

  • FIX: UUID 'Namespace' can't be assigned to the parameter type 'String?' (#566). (1e93a595)

openai_realtime_dart - v0.0.1+1

  • DOCS: Add note about the openai_dart client. (26de8d97)

2024-10-08

29 Oct 22:31
63f7092

Choose a tag to compare

Changes


Packages with breaking changes:

  • There are no breaking changes in this release.

New packages:

Packages with other changes:


langchain - v0.7.7

  • REFACTOR: Update deprecated UUID constant (#558). (8d9f14b4)

langchain_google - v0.6.4

  • FEAT: Add support for code execution in ChatGoogleGenerativeAI (#564). (020bc096)

openai_realtime_dart - v0.0.1

  • FEAT: Implement openai_realtime_dart, a Dart client for OpenAI Realtime API (#562). (9f7406f7)

openai_dart - v0.4.2+1

2024-09-25

29 Oct 22:28
9b5518e

Choose a tag to compare

Changes


Packages with breaking changes:

  • There are no breaking changes in this release.

Packages with other changes:

Packages with dependency updates only:

Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.

  • langchain_supabase - v0.1.1+3
  • langchain_pinecone - v0.1.0+9
  • langchain_anthropic - v0.1.1+2
  • langchain_chroma - v0.2.1+3
  • langchain_mistralai - v0.2.3+1
  • vertex_ai - v0.1.0+2

langchain - v0.7.6

langchain_core - v0.3.6

langchain_community - v0.3.2

  • FEAT: Add support for deleteWhere in ObjectBoxVectorStore (#552). (90918bba)
  • REFACTOR: Add stubs for ObjectBox on web platform (#553). (41caed92)

langchain_firebase - v0.2.1+2

  • DOCS: Update Google's models in documentation (#551). (1da543f7)

langchain_google - v0.6.3+1

  • FEAT: Add support for reduced output dimensionality in GoogleGenerativeAIEmbeddings (#544). (d5880704)
  • DOCS: Update Google's models in documentation (#551). (1da543f7)

langchain_ollama - v0.3.2

  • FEAT: Update Ollama default model to llama-3.2 (#554). (f42ed0f0)

langchain_openai - v0.7.2

  • FEAT: Add OpenAI o1-preview and o1-mini to model catalog (#555). (9ceb5ff9)
  • REFACTOR: Migrate ChatOpenAI to maxCompletionTokens (#557). (08057a5b)

ollama_dart - v0.2.2

  • FEAT: Update Ollama default model to llama-3.2 (#554). (f42ed0f0)

openai_dart - v0.4.2

  • FEAT: Add OpenAI o1-preview and o1-mini to model catalog (#555). (9ceb5ff9)
  • FEAT: Add support for maxCompletionTokens and reasoningTokens in openai_dart (#556). (37d75b61)
  • FEAT: Option to include file search results in assistants API (#543). (e916ad3c)

Contributors

v0.7.5

22 Aug 18:05
9dff3cf

Choose a tag to compare

2024-08-22

What's New?

โœจ OpenAI's Structured Outputs

The ChatOpenAI wrapper now supports OpenAI's Structured Outputs. This allows you to provide a JSON Schema to guide the model's responses, ensuring they adhere to your desired JSON format. You can simply provide the schema for guidance, or enable strict mode to guarantee the model's output matches the schema exactly, so you don't need to worry about the model omitting a required key, or hallucinating an invalid enum value. Mind that only a subset of JSON Schema is supported when strict is enabled.

final chatModel = ChatOpenAI(
  apiKey: openaiApiKey,
  defaultOptions: ChatOpenAIOptions(
    model: 'gpt-4o',
    responseFormat: ChatOpenAIResponseFormat.jsonSchema(
      ChatOpenAIJsonSchema(
        name: 'Companies',
        description: 'A list of companies',
        strict: true,
        schema: {
          'type': 'object',
          'properties': {
            // your schema definition
          },
          'additionalProperties': false,
        },
      ),
    ),
  ),
);

Strict mode is also available when working with tools. ToolSpec now has a strict field that you can set it to true to enable it.

Read more about how it works internally in their announcement blog post and how to use it in LangChain.dart in the ChatOpenAI documentation.

๐Ÿค– ToolsAgent: A Generic Tool-Calling Agent

While we're working on porting LangGraph to Dart, we've refactored OpenAIToolsAgent into a new, more versatile ToolsAgent. This generic agent can be used with any model that supports tool-calling, including ChatOllama, ChatOpenAI, ChatAnthropic, and more. Check out the docs for more info.

To migrate from OpenAIToolsAgent to ToolsAgent just run:

dart fix --apply

๐Ÿ› ๏ธ Other Improvements

  • All RunnableOptions subclasses now have a convenient copyWith method for easier modification.
  • ChatOpenAI now includes log probabilities (logprobs) in the result metadata, offering more context for analysis.
  • Removed the OpenAI-Beta header in ChatOpenAI to prevent CORS issues when using OpenRouter.
  • Added gpt-4o-2024-08-06 and chatgpt-4o-latest to the model catalog in ChatOpenAI.
  • Added support for min_p in ChatOllama, providing more control over the sampling process.

๐Ÿ’ก Introducing Code Assist AI

Thanks to the team at CommandDash, we now have a dedicated AI chatbot to help you with LangChain.dart! This chatbot can answer your questions, provide documentation links, and even generate code snippets. Try it out here:

Code Assist AI

๐Ÿ”ง API Clients Updates

  • openai_dart: Now supports OpenAI's Structured Outputs.
  • ollama_dart: Now supports the min_p parameter for finer control over sampling.

Changes


Packages with breaking changes:

  • There are no breaking changes in this release.

Packages with other changes:

Packages with dependency updates only:

Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.

  • langchain_firebase - v0.2.1+1
  • langchain_supabase - v0.1.1+2
  • langchain_pinecone - v0.1.0+8
  • langchain_anthropic - v0.1.1+1
  • langchain_chroma - v0.2.1+2

langchain - v0.7.5

  • FEAT: Add ToolsAgent for models with tool-calling support (#530). (f3ee5b44)
  • FEAT: Deprecate OpenAIToolsAgent in favour of ToolsAgent (#532). (68d8011a)
  • DOCS: Add Code Assist AI in README and documentation (#538). (e752464c)

langchain_core - v0.3.5

  • FEAT: Add copyWith method to all RunnableOptions subclasses (#531). (42c8d480)
  • FEAT: Support OpenAI's strict mode for tool calling in ChatOpenAI (#536). (71623f49)
  • FEAT: Deprecate OpenAIToolsAgent in favour of ToolsAgent (#532). (68d8011a)

langchain_community - v0.3.1

  • FEAT: Deprecate OpenAIToolsAgent in favour of ToolsAgent (#532). (68d8011a)

langchain_openai - v0.7.1

  • FEAT: Add support for Structured Outputs in ChatOpenAI (#526). (c5387b5d)
  • FEAT: Handle refusal in OpenAI's Structured Outputs API (#533). (f4c4ed99)
  • FEAT: Include logprobs in result metadata from ChatOpenAI (#535). (1834b3ad)
  • FEAT: Add chatgpt-4o-latest to model catalog (#527). (ec82c760)
  • FEAT: Add gpt-4o-2024-08-06 to model catalog (#522). (563200e0)
  • FEAT: Deprecate OpenAIToolsAgent in favour of ToolsAgent (#532). (68d8011a)
  • REFACTOR: Don't send OpenAI-Beta header in ChatOpenAI (#511). (0e532bab)

langchain_ollama - v0.3.1

  • FEAT: Add support for min_p in Ollama (#512). (e40d54b2)
  • FEAT: Add copyWith method to all RunnableOptions subclasses (#531). (42c8d480)

langchain_google - v0.6.2

  • FEAT: Add copyWith method to all RunnableOptions subclasses (#531). (42c8d480)

langchain_mistralai - v0.2.3

  • FEAT: Add copyWith method to all RunnableOptions subclasses (#531). (42c8d480)

openai_dart - v0.4.1

  • FEAT: Add support for Structured Outputs (#525). (c7574077)
  • FEAT: Add log probabilities for refusal tokens (#534). ([8470a24...
Read more

v0.7.4

26 Jul 22:15
d3d0291

Choose a tag to compare

2024-07-26

What's New?

๐Ÿ”ฅ Ollama Tool Support

ChatOllama now offers support for native tool calling with popular models such as Llama 3.1, the latest state-of-the-art model from Meta. This enables a model to answer a given prompt using tool(s) it knows about, making it possible for models to perform more complex tasks or interact with the outside world. It follows the standard LangChain.dart tools API, so you can use it in the same way as you would with other providers that support tool-calling (e.g., ChatOpenAI, ChatAnthropic, etc.).

Explore more:

๐Ÿ”„ Runnable Fallbacks

When working with language models, you may encounter issues from the underlying APIs, such as rate limits or downtime. To enhance reliability in production environments, we've introduced Runnable Fallbacks. This feature allows you to define alternative models or even entirely different chains to use when the primary option fails. Create fallbacks using the withFallbacks() function:

final chatModel = chatOpenAI.withFallbacks([chatAnthropic, chatMistral]);

Check out the full documentation on how to use fallbacks.

๐Ÿ”— Bind Improvements

We've enhanced the bind functionality to merge options additively across multiple cascade bind calls. This change preserves existing options while allowing specific overrides, providing more flexibility in configuration. Also, LanguageModelOptions (e.g., ChatOpenAIOptions, ChatMistralAIOptions, etc.) no longer specify the default model in the constructor, preventing the model from being reset when using the bind operator.

๐ŸŒŸ OpenAI GPT-4o-mini

A week ago, OpenAI released GPT-4o mini, their most cost-efficient small model. We have now made it the default model for the ChatOpenAI wrapper.

Additionally, you can now disable parallel tool calls and define the service tier in ChatOpenAI.

โœจ Mistral New Models

Mistral recently released several powerful models: Mistral Large 2, Mistral NeMo, and Codestral Mamba. o take advantage of these models, use the ChatMistralAI wrapper from the langchain_mistralai package.

final chatModel = ChatMistralAI(
  apiKey: 'your-api-key',
  defaultOptions: ChatMistralAIOptions(
    model: 'mistral-large-latest',
  ),
);

๐Ÿ”ง API Clients Updates

  • ollama_dart: Now supports tool calls, a new API for retrieving the Ollama server version, and extended model information in the model API.
  • openai_dart: Adds support for disabling parallel tool calls and specifying the service tier in the chat completions API, and customising the chunking strategy in the file_search tool and overrides in the assistants API. You can now also customise the OpenAI-Beta header for beta features.

Changes


Packages with breaking changes:

Packages with other changes:


langchain - v0.7.4

  • FEAT: Add Fallback support for Runnables (#501). (5887858d)
  • FEAT: Implement additive options merging for cascade bind calls (#500). (8691eb21)
  • REFACTOR: Remove default model from the language model options (#498). (44363e43)
  • REFACTOR: Depend on exact versions for internal 1st party dependencies (#484). (244e5e8f)
  • DOCS: Update README.md with Ollama tool call support. (e016b0bd)

langchain_core - v0.3.4

  • FEAT: Add Fallback support for Runnables (#501). (5887858d)
  • FEAT: Implement additive options merging for cascade bind calls (#500). (8691eb21)
  • REFACTOR: Remove default model from the language model options (#498). (44363e43)

langchain_community - v0.3.0

  • FEAT: Implement additive options merging for cascade bind calls (#500). (8691eb21)
  • REFACTOR: Depend on exact versions for internal 1st party dependencies (#484). (244e5e8f)

langchain_ollama - v0.3.0

  • FEAT: Add tool calling support in ChatOllama (#505). (6ffde204)
  • BREAKING FEAT: Update Ollama default model to llama-3.1 (#506). (b1134bf1)
  • FEAT: Implement additive options merging for cascade bind calls (#500). (8691eb21)
  • REFACTOR: Remove default model from the language model options (#498). (44363e43)
  • REFACTOR: Depend on exact versions for internal 1st party dependencies (#484). (244e5e8f)
  • DOCS: Update Ollama request options default values in API docs (#479). (e1f93366)

langchain_openai - v0.7.0

  • BREAKING FEAT: Update ChatOpenAI default model to gpt-4o-mini (#507). (c7b8ce91)
  • FEAT: Add support for disabling parallel tool calls in ChatOpenAI (#493). (c46d676d)
  • FEAT: Add GPT-4o-mini to model catalog (#497). (faa23aee)
  • FEAT: Add support for service tier in ChatOpenAI (#495). (af79a4ff)
  • FEAT: Implement additive options merging for cascade bind calls...
Read more

v0.7.3

04 Jul 07:34
9a27506

Choose a tag to compare

2024-07-02

What's New?

๐Ÿ”ฅ Anthropic Integration

Introducing the new langchain_anthropic package, which provides support for the ChatAnthropic chat model wrapper to consume the Anthropic's Messages API. This integration gives you access to cutting-edge models such as Claude 3.5 Sonnet, which sets new standards in reasoning, knowledge and coding, while offering enhanced capabilities in image understanding, data analysis and writing.

final chatModel = ChatAnthropic(
  apiKey: 'yourApiKey',
  defaultOptions: ChatAnthropicOptions(
    model: 'claude-3-5-sonnet-20240620',
  ),
);

ChatAnthropic supports streaming and tool calling. For more information, check out the docs.

๐Ÿ” Tavily Search Integration

Connect your LLMs to the web with the new Tavily integration, a search engine optimized for LLMs and RAG.

  • TavilySearchResultsTool: returns a list of real-time, accurate, and factual search results for a query.
  • TavilyAnswerTool: returns a direct answer for a query.

๐Ÿค– Google AI and VertexAI for Firebase

  • Both ChatFirebaseVertexAI and ChatGoogleGenerativeAI now utilize the gemini-1.5-flash model by default.
  • Added MIME type support, allowing you to force the model to reply using JSON.
  • ChatFirebaseVertexAI now supports Firebase Auth.
  • ChatFirebaseVertexAI now correctly reports usage metadata.

๐Ÿ›  Tool calling improvements

  • You can now use ChatToolChoice.required to enforce the use of at least one tool, without specifying a particular one.

๐Ÿ“š Documentation Updates

  • We've heard your feedback about the difficulty in finding all supported integrations and their corresponding packages. Now, you can easily locate this information in one place.

๐Ÿงฉ API Clients Releases

  • A new tavily_dart client is available for consuming the Tavily API.
  • The anthropic_sdk_dart client now supports tool use, including streaming tools.

Changes


New packages:

Packages with breaking changes:

Packages with other changes:


langchain - v0.7.3

Note: Anthropic integration (ChatAnthropic) is available in the new langchain_anthropic package.

  • FEAT: Add support for TavilySearchResultsTool and TavilyAnswerTool (#467). (a9f35755)
  • DOCS: Document existing integrations in README.md. (cc4246c8)

langchain_core - v0.3.3

  • FEAT: Add support for ChatToolChoiceRequired (#474). (bf324f36)
  • FEAT: Update ChatResult.id concat logic (#477). (44c7fafd)

langchain_community - v0.2.2

  • FEAT: Add support for TavilySearchResultsTool and TavilyAnswerTool (#467). (a9f35755)

langchain_anthropic - v0.1.0

langchain_firebase - v0.2.0

Note: ChatFirebaseVertexAI now uses gemini-1.5-flash model by default.

  • BREAKING FEAT: Update ChatFirebaseVertexAI default model to gemini-1.5-flash (#458). (d3c96c52)
  • FEAT: Add support for ChatToolChoiceRequired (#474). (bf324f36)
  • FEAT: Support response MIME type in ChatFirebaseVertexAI (#461) (#463). (c3452721)
  • FEAT: Add support for Firebase Auth in ChatFirebaseVertexAI (#460). (6d137290)
  • FEAT: Add support for usage metadata in ChatFirebaseVertexAI (#457). (2587f9e2)
  • REFACTOR: Simplify how tools are passed to the internal Firebase client (#459). (7f772396)

langchain_google - v0.6.0

Note: ChatGoogleGenerativeAI now uses gemini-1.5-flash model by default.

  • BREAKING FEAT: Update ChatGoogleGenerativeAI default model to gemini-1.5-flash (#462). (c8b30c90)
  • FEAT: Add support for ChatToolChoiceRequired (#474). (bf324f36)
  • FEAT: Support response MIME type and schema in ChatGoogleGenerativeAI (#461). (e258399e)
  • REFACTOR: Migrate conditional imports to js_interop (#453). (a6a78cfe)

langchain_openai - v0.6.3

  • FEAT: Add support for ChatToolChoiceRequired (#474). (bf324f36)

langchain_ollama - v0.2.2+1

  • DOCS: Update ChatOllama API docs. (cc4246c8)

langchain_chroma - v0.2.1

  • Update a dependency to the latest release.

langchain_mistralai - v0.2.1

  • Update a dependency to the latest release.

langchain_pinecone - v0.1.0+6

  • Update a dependency to the latest release.

langchain_supabase - v0.1.1

  • Update a dependency to the latest release.

anthropic_sdk_dart - v0.1.0

  • FEAT: Add support for tool use in anthropic_sdk_dart client (#469). (81896cfd)
  • FEAT: Add extensions on ToolResultBlockContent in anthropic_sdk_dart (#476). (8d92d9b0)
  • REFACTOR: Improve schemas names in anthropic_sdk_dart (#475). (8ebeacde)
  • REFACTOR: Migrate ...
Read more

v0.7.2

01 Jun 09:02
b93c25d

Choose a tag to compare

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.