- [BREAKING]: A breaking change. After an upgrade, your app may need modifications to keep working correctly.
- [FEATURE]: A non-breaking improvement to the app. Either introduces new functionality, or improves on an existing feature.
- [BUGFIX]: Fixes a bug with a non-breaking change.
- [COMPAT]: Compatibility improvements - changes to make Langchain.rb more compatible with different dependency versions.
- [OPTIM]: Optimization or performance increase.
- [DOCS]: Documentation changes. No changes to the library's behavior.
- [SECURITY]: A change which fixes a security vulnerability.
- [BUGFIX] [#1044] Cap automatic assistant turns to prevent infinite tool execution loops.
- [BUGFIX] [#1040] Fix
parallel_tool_calls: falsefor Google Gemini assistants by serializing tool execution across model turns. - [COMPAT] [#980] Suppress a Ruby 3.4 warning for URI parser.
- [BREAKING] [#997] Remove
Langchain::Vectorsearch::Epsillaclass - [BREAKING] [#1003] Response classes are now namespaced under
Langchain::LLM::Response, converted to Rails engine
- [BREAKING] [#859] Add metadata support to PgVector storage
- [BUGFIX] [#939] Fix Langchain::Vectorsearch::Milvus initializer by passing :api_key
- [BUGFIX] [#953] Handle nil response in OpenAI LLM streaming
- [BREAKING] [#956] Deprecate
Langchain::Vectorsearch::Epsillaclass - [BREAKING] [#961] Deprecate
Langchain::LLM::LlamaCppclass - [BREAKING] [#962] Deprecate
Langchain::LLM::AI21class - [BREAKING] [#971] Exclude
temperaturefrom being automatically added to OpenAI LLM parameters - [OPTIM] [#977] Enable
Langchain::Tool::RubyCodeInterpreteron Ruby 3.3+
- [BREAKING] [#894] Tools can now output image_urls, and all tool output must be wrapped by a tool_response() method
- [BUGFIX] [#921] Fix for Assistant when OpenAI o1/o3 models are used
- [BUGFIX] [#900] Empty text content should not be set when content is nil when using AnthropicMessage
- [FEATURE] [#884] Add
tool_execution_callbacktoLangchain::Assistant, a callback function (proc, lambda) that is called right before a tool is executed
- [FEATURE] [#858] Assistant, when using Anthropic, now also accepts image_url in the message.
- [FEATURE] [#861] Clean up passing
max_tokensto Anthropic constructor and chat method - [FEATURE] [#849] Langchain::Assistant now works with AWS Bedrock-hosted Anthropic models
- [OPTIM] [#867] Refactor
GoogleGeminiMessage#to_hashandOpenAIMessage#to_hashmethods. - [OPTIM] [#849] Simplify Langchain::LLM::AwsBedrock class
- [BUGFIX] [#869] AnthropicMessage now correctly handles tool calls with content.
- [OPTIM] [#870] Assistant, when using Ollama (e.g.: llava model), now also accepts image_url in the message.
- [BREAKING] [#840] Rename
chat_completion_model_nameparameter tochat_modelin Langchain::LLM parameters. - [BREAKING] [#840] Rename
completion_model_nameparameter tocompletion_modelin Langchain::LLM parameters. - [BREAKING] [#840] Rename
embeddings_model_nameparameter toembedding_modelin Langchain::LLM parameters. - [BUGFIX] [#850] Fix MistralAIMessage to handle "Tool" Output
- [BUGFIX] [#837] Fix bug when tool functions with no input variables are used with Langchain::LLM::Anthropic
- [BUGFIX] [#836] Fix bug when assistant.instructions = nil did not remove the system message
- [FEATURE] [#838] Allow setting safety_settings: [] in default_options for Langchain::LLM::GoogleGemini and Langchain::LLM::GoogleVertexAI constructors
- [BUGFIX] [#871] Allow passing in options hash to Ollama
- [BREAKING] Remove
Langchain::Assistant#clear_thread!method - [BREAKING]
Langchain::Messages::*namespace had migrated toLangchain::Assistant::Messages::* - [BREAKING] Modify
Langchain::LLM::AwsBedrockconstructor to pass model options via default_options: {...} - Introduce
Langchain::Assistant#parallel_tool_callsoptions whether to allow the LLM to make multiple parallel tool calls. Default: true - Minor improvements to the Langchain::Assistant class
- Added support for streaming with Anthropic
- Bump anthropic gem
- Default Langchain::LLM::Anthropic chat model is "claude-3-5-sonnet-20240620" now
- Move Langchain::Assistant::LLM::Adapter-related classes to separate files
- Fix Langchain::Tool::Database#describe_table method
- [BREAKING] Langchain::Vectorsearch::Milvus was rewritten to work with newer milvus 0.10.0 gem
- [BREAKING] Removing Langchain::LLM::GooglePalm
- Assistant can now process image_urls in the messages (currently only for OpenAI and Mistral AI)
- Vectorsearch providers utilize the global Langchain.logger
- Update required milvus, qdrant and weaviate versions
- Deprecate Langchain::LLM::GooglePalm
- Allow setting response_object: {} parameter when initializing supported Langchain::LLM::* classes
- Simplify and consolidate logging for some of the LLM providers (namely OpenAI and Google). Now most of the HTTP requests are being logged when on DEBUG level
- Improve doc on how to set up a custom logger with a custom destination
- Remove
Langchain::Threadclass as it was not needed. - Support
cohereprovider forLangchain::LLM::AwsBedrock#embed
- Throw an error when
Langchain::Assistant#add_message_callbackis not a callable proc. - Resetting instructions on Langchain::Assistant with Google Gemini no longer throws an error.
- Add Meta models support for AWS Bedrock LLM
- Fix for Langchain::Prompt::PromptTemplate supporting nested JSON data
- Require common libs at top-level
- Add
add_message_callbacktoLangchain::Assistantconstructor to invoke an optional function when any message is added to the conversation - Adding Assistant syntactic sugar with #run! and #add_message_and_run!
- Improve the Langchain::Tool::Database tool
- Allow explictly setting tool_choice on the Assistant instance
- Add support for bulk embedding in Ollama
Langchain::Assistantworks withLangchain::LLM::MistralAIllm- Fix Langchain::LLM::Azure not applying full default_options
- Fix OpenAI#embed when text-embedding-ada-002 is used
- Add Assistant#add_messages() method and fix Assistant#messages= method
- Drop
to_boolgem in favour of custom util class - Drop
colorizewhich is GPL-licensed in favour ofrainbow - Improve Langchain::Tool::Weather tool
- Fix Langchain::Assistant when llm is Anthropic
- Fix GoogleGemini#chat method
- Langchain::LLM::Weaviate initializer does not require api_key anymore
- [BREAKING] Langchain::LLM::OpenAI#chat() uses
gpt-4o-miniby default instead ofgpt-3.5-turbopreviously. - [BREAKING] Assistant works with a number of open-source models via Ollama.
- [BREAKING] Introduce new
Langchain::ToolDefinitionmodule to define tools. This replaces the previous reliance on subclassing fromLangchain::Tool::Base.
- Removed TokenLength validators
- Assistant works with a Mistral LLM now
- Assistant keeps track of tokens used
- Misc fixes and improvements
- Add Milvus#remove_texts() method
- Langchain::Assistant has a
statenow - Misc fixes and improvements
- Fix Chroma#remove_texts() method
- Fix NewsRetriever Tool returning non UTF-8 characters
- Misc fixes and improvements
- New π οΈ
Langchain::Tool::Tavilyto execute search (better than the GoogleSearch tool) - Remove
activesupportdependency - Misc fixes and improvements
- New
Langchain::LLM::GoogleGemini#embed()method Langchain::Assistantworks withLangchain::LLM::Anthropicllm- New XLS file processor
- Fixes and improvements
- Better error handling for
Langchain::LLM::GoogleVertexAI
- New π οΈ
Langchain::Tool::NewsRetrievertool to fetch news via newsapi.org - Langchain::Assistant works with
Langchain::LLM::GoogleVertexAIandLangchain::LLM::GoogleGeminillms - [BREAKING] Introduce new
Langchain::Messages::Baseabstraction
- Langchain::LLM::Ollama now uses
llama3by default - Langchain::LLM::Anthropic#complete() now uses
claude-2.1by default - Updated with new OpenAI models, including
gpt-4o - New
Langchain::LLM::Cohere#chat()method. - Introducing
UnifiedParametersto unify parameters across LLM classes
- [BREAKING] Rename
dimensionparameter todimensionseverywhere
- New
Langchain::LLM::AWSBedrock#chat()to wrap Bedrock Claude requests - New
Langchain::LLM::OllamaResponse#total_tokens()method
- New
Langchain::Processors::Pptxto parse .pptx files - New
Langchain::LLM::Anthropic#chat()support - Misc fixes
- New
Langchain::Assistant#clear_thread!andLangchain::Assistant#instructions=methods
- Langchain::Tool::Vectorsearch that wraps Langchain::Vectorsearch::* classes. This allows the Assistant to call the tool and inject data from vector DBs.
- Delete previously deprecated
Langchain::Agent::ReActAgentandLangchain::Agent::SQLQueryAgentclasses - New
Langchain::Agent::FileSystemtool that can read files, write to files, and list the contents of a directory
- Bump dependencies
- Ollama#complete fix
- Misc fixes
- New Langchain::LLM::Mistral
- Drop Ruby 3.0 support
- Fixes Zeitwerk::NameError
- Delete
Langchain::Conversationclass
- Now using OpenAI's "text-embedding-3-small" model to generate embeddings
- Added
remove_texts(ids:)method to Qdrant and Chroma - Add Ruby 3.3 support
- New
Ollama#summarize()method - Improved README
- Fixes + specs
- Add EML processor
- Tools can support multiple-methods
- Bump gems and bug fixes
- Fix vectorsearch#ask methods
- Bump cohere-ruby gem
- Add support for new OpenAI models
- Add Ollama#chat method
- Fix and refactor of
Langchain::LLM::Ollama, responses can now be streamed.
- Introducing new
Langchain::Assistantthat will be replacingLangchain::ConversationandLangchain::Agents. Langchain::Conversationis deprecated.
- Introducing new
Langchain::Chunker::Markdownchunker (thanks @spikex) - Fixes
- Support for Epsilla vector DB
- Fully functioning Google Vertex AI LLM
- Bug fixes
- [BREAKING] Updated llama_cpp.rb to 0.9.4. The model file format used by the underlying llama.cpp library has changed to GGUF. llama.cpp ships with scripts to convert existing files and GGUF format models can be downloaded from HuggingFace.
- Introducing Langchain::LLM::GoogleVertexAI LLM provider
- Fixes
- AWS Bedrock is available as an LLM provider. Available models from AI21, Cohere, AWS, and Anthropic.
- LLM response passes through the context in RAG cases
- Fix gpt-4 token length validation
- Azure OpenAI LLM support
- Ragas evals tool to evaluate Retrieval Augmented Generation (RAG) pipelines
- BREAKING: Moving Rails-specific code to
langchainrb_railsgem
- Elasticsearch vector search support
- Fix
lib/langchain/railtie.rbnot being loaded with the gem
- Introduce `Langchain::LLM::Response`` object
- Introduce
Langchain::Chunkobject - Add the ask() method to the Langchain::ActiveRecord::Hooks
- Bump weaviate and chroma-db deps
Langchain::Chunker::Semanticchunker- Re-structure Conversations class
- Bug fixes
- HyDE-style similarity search
Langchain::Chunker::Sentencechunker- Bug fixes
- Bump weaviate-ruby gem version
- Ollama support
- Add
findmethod toLangchain::Vectorsearch::Qdrant - Enhance Google search output
- Raise ApiError when OpenAI returns an error
- Update OpenAI
completemethod to use chat completion api- Deprecate legacy completion models. See https://platform.openai.com/docs/deprecations/2023-07-06-gpt-and-embeddings
- Add
k:parameter to allask()vector search methods - Bump Faraday to 2.x
- π£οΈ LLMs
- Introducing Anthropic support
- Support for OpenAI functions
- Streaming vectorsearch ask() responses
- Langchain::Chunker::RecursiveText
- Fixes
- π£οΈ LLMs
- Introducing Llama.cpp support
- Langchain::OutputParsers::OutputFixingParser to wrap a Langchain::OutputParser and handle invalid response
- Fix
Langchain::Vectorsearch::Qdrant#add_texts() - Introduce
ConversationMemory - Allow loading multiple files from a directory
- Add
get_default_schema(),create_default_schema(),destroy_default_schema()missing methods toLangchain::Vectorsearch::*classes
- Add #destroy_default_schema() to Langchain::Vectorsearch::* classes
- Qdrant, Chroma, and Pinecone are supported by ActiveRecord hooks
- Adding support to hook vectorsearch into ActiveRecord models
- [BREAKING] Rename
ChainOfThoughtAgenttoReActAgent - Implement A21 token validator
- Add
Langchain::OutputParsers
- Developer can modify models used when initiliazing
Langchain::LLM::*clients - Improvements to the
SQLQueryAgentand the database tool
- If used with OpenAI, Langchain::Conversation responses can now be streamed.
- Improved logging
- Langchain::Tool::SerpApi has been renamed to Langchain::Tool::GoogleSearch
- JSON prompt templates have been converted to YAML
- Langchain::Chunker::Text is introduced to provide simple text chunking functionality
- Misc fixes and improvements
- [BREAKING] Rename
Langchain::ChattoLangchain::Conversation - π οΈ Tools
- Introducing
Langchain::Tool::Weather, a tool that calls Open Weather API to retrieve the current weather
- Introducing
- π Vectorsearch
- Introducing support for HNSWlib
- Improved and new
Langchain::Chatinterface that persists chat history in memory
- π£οΈ LLMs
- Chat message history support for Langchain::LLM::GooglePalm and Langchain::LLM::OpenAI
- π£οΈ LLMs
- Auto-calculate the max_tokens: setting to be passed on to OpenAI
- π οΈ Tools
- Modified Tool usage. Agents now accept Tools instances instead of Tool strings.
- [BREAKING] LLMs are now passed as objects to Vectorsearch classes instead of
llm: :name, llm_api_key:previously - π Prompts
- YAML prompt templates are now supported
- π Loaders
- Introduce
Langchain::Processors::Xlsxto parse .xlsx files
- Introduce
- π£οΈ LLMs
- Introducing support for AI21
- Better docs generation
- Refactors
- Beautiful colored log messages
- π οΈ Tools
- Introducing
Langchain::Tool::RubyCodeInterpreter, a tool executes sandboxed Ruby code
- Introducing
- [BREAKING] Everything is namespaced under
Langchain::now - Pgvector similarity search uses the cosine distance by default now
- OpenAI token length validation using tiktoken_ruby
- Drop Ruby 2.7 support. It had reached EOD.
- Bump pgvector-ruby to 0.2
- π Loaders
- Support for options and block to be passed to CSV processor
- π Vectorsearch
- Not relying on Weaviate modules anymore
- Adding missing specs for Qdrant and Milvus classes
- π Loaders
- Add Langchain::Data result object for data loaders
- π£οΈ LLMs
- Add
summarize()method to the LLMs
- Add
- π Vectorsearch
- Pgvector support
- π Loaders
- CSV loader
- JSON loader
- JSONL loader
- π Vectorsearch
- Introduce namespace support for Pinecone
- π Loaders
- Loaders overhaul
- π£οΈ LLMs
- Introducing support for Google PaLM (Pathways Language Model)
- Bug fixes and improvements
- π£οΈ LLMs
- Introducing support for Replicate.com
- π Loaders
- Introduce
Loaders::Docxto parse .docx files
- Introduce
-
π Vectorsearch
- Introduce support for Chroma DB
-
π Loaders
- Bug fix
Loaders::Textto only parse .txt files
- Bug fix
- π Loaders
- Introduce
Loaders::Textto parse .txt files - Introduce
Loaders::PDFto parse .pdf files
- Introduce
- π£οΈ LLMs
- Bump
hugging-facegem version
- Bump
- Bug fixes
- π£οΈ LLMs
- Introducing support for HuggingFace
- Dependencies are now optionally loaded and required at runtime
- Start using
standardrbfor linting - Use the Ruby logger
- π€ Agents
- Fix Chain of Thought prompt loader
- π οΈ Tools
- Introducing
Tool::Wikipedia, a tool that looks up Wikipedia entries
- Introducing
- π€ Agents
- Introducing
Agent::ChainOfThoughtAgent, a semi-autonomous bot that uses Tools to retrieve additional information in order to make best-effort informed replies to user's questions.
- Introducing
- π οΈ Tools
- Introducing
Tool::Calculatortool that solves mathematical expressions. - Introducing
Tool::Searchtool that executes Google Searches.
- Introducing
- π Prompt Templating
- Ability to create prompt templates and save them to JSON files
- Default
Prompt::FewShotPromptTemplate - New examples added to
examples/
- Backfilling missing specs
- Initial release