Skip to content

v0.3.2

Compare
Choose a tag to compare
@davidmigloz davidmigloz released this 13 Jan 11:48
· 312 commits to main since this release
644609e

2024-01-13

What's new?

OpenRouter

๐Ÿ†• OpenRouter support

OpenRouter offers a unified OpenAI-compatible API for a broad range of models. You can also let users pay for their own models via their OAuth PKCE flow.

You can now consume their API using the ChatOpenAI wrapper.

final chatModel = ChatOpenAI(
  apiKey: openRouterApiKey,
  baseUrl: 'https://openrouter.ai/api/v1',
  defaultOptions: const ChatOpenAIOptions(
    model: 'mistralai/mistral-small',
  ),
);

Check out the documentation for more details.

๐Ÿ› Fixed long build times when using tokenizer

LangChain.dart was using tiktoken package to tokenize prompts. This package suffers from a bug that causes long build times. Unfortunately, the maintainer is not very active anymore. So @orenagiv has released a new package langchain_tiktoken fixing this issue, and we have migrated to it.

โœจ Other fixes an improvements

  • Added copyWith method to all options classes (like ChatOpenAIOptions) to make it easier to update options
  • ConversationTokenBufferMemory and ConversationSummaryMemory are now properly exported in langchain package

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_pinecone - v0.0.6+11
  • langchain_chroma - v0.1.0+12

langchain - v0.3.2

  • REFACTOR(llms): Make all LLM options fields nullable and add copyWith (#284). (57eceb9b)
  • FIX(memory): Export ConversationSummaryMemory (#283). (76b01d23)
  • FEAT: Update internal dependencies (#291). (69621cc6)

langchain_openai - v0.3.2

  • FEAT(chat-models): Support OpenRouter API in ChatOpenAI wrapper (#292). (c6e7e5be) (docs)
  • REFACTOR(llms): Make all LLM options fields nullable and add copyWith (#284). (57eceb9b)
  • REFACTOR: Migrate tokenizer to langchain_tiktoken package (#285). (6a3b6466)
  • FEAT: Update internal dependencies (#291). (69621cc6)

langchain_google - v0.2.3

  • REFACTOR: Use cl100k_base encoding model when no tokenizer is available (#295). (ca908e80)
  • REFACTOR(llms): Make all LLM options fields nullable and add copyWith (#284). (57eceb9b)
  • REFACTOR: Migrate tokenizer to langchain_tiktoken package (#285). (6a3b6466)
  • FEAT: Update internal dependencies (#291). (69621cc6)

langchain_mistralai - v0.0.2

  • REFACTOR: Use cl100k_base encoding model when no tokenizer is available (#295). (ca908e80)
  • REFACTOR(llms): Make all LLM options fields nullable and add copyWith (#284). (57eceb9b)
  • REFACTOR: Migrate tokenizer to langchain_tiktoken package (#285). (6a3b6466)
  • FEAT: Update internal dependencies (#291). (69621cc6)

langchain_ollama - v0.0.3

  • REFACTOR: Use cl100k_base encoding model when no tokenizer is available (#295). (ca908e80)
  • REFACTOR(llms): Make all LLM options fields nullable and add copyWith (#284). (57eceb9b)
  • REFACTOR: Migrate tokenizer to langchain_tiktoken package (#285). (6a3b6466)
  • FEAT: Update internal dependencies (#291). (69621cc6)

openai_dart - v0.1.4

  • FEAT(openai_dart): Support OpenRouter API (#292). (57699b32)
  • FEAT(openai_dart): Remove OpenAI deprecated models (#290). (893b1c51)

googleai_dart - v0.0.2+1

  • REFACTOR(llms): Make all LLM options fields nullable and add copyWith (#284). (57eceb9b)

mistralai_dart - v0.0.2+1

  • REFACTOR(llms): Make all LLM options fields nullable and add copyWith (#284). (57eceb9b)

vertex_ai - v0.0.8

Contributors


๐Ÿ“ฃ Check out the #announcements channel in the LangChain.dart Discord server for more details.