- [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.
- [FEATURE] [#858] Assistant, when using Anthropic, now also accepts image_url in the message.
- [FEATURE] [#861] Clean up passing
max_tokens
to Anthropic constructor and chat method - [FEATURE] [#849] Langchain::Assistant now works with AWS Bedrock-hosted Anthropic models
- [OPTIM] [#867] Refactor
GoogleGeminiMessage#to_hash
andOpenAIMessage#to_hash
methods. - [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_name
parameter tochat_model
in Langchain::LLM parameters. - [BREAKING] [#840] Rename
completion_model_name
parameter tocompletion_model
in Langchain::LLM parameters. - [BREAKING] [#840] Rename
embeddings_model_name
parameter toembedding_model
in 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::AwsBedrock
constructor to pass model options via default_options: {...} - Introduce
Langchain::Assistant#parallel_tool_calls
options 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::Thread
class as it was not needed. - Support
cohere
provider forLangchain::LLM::AwsBedrock#embed
- Throw an error when
Langchain::Assistant#add_message_callback
is 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_callback
toLangchain::Assistant
constructor 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::Assistant
works withLangchain::LLM::MistralAI
llm- 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_bool
gem in favour of custom util class - Drop
colorize
which 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-mini
by default instead ofgpt-3.5-turbo
previously. - [BREAKING] Assistant works with a number of open-source models via Ollama.
- [BREAKING] Introduce new
Langchain::ToolDefinition
module 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
state
now - Misc fixes and improvements
- Fix Chroma#remove_texts() method
- Fix NewsRetriever Tool returning non UTF-8 characters
- Misc fixes and improvements
- New π οΈ
Langchain::Tool::Tavily
to execute search (better than the GoogleSearch tool) - Remove
activesupport
dependency - Misc fixes and improvements
- New
Langchain::LLM::GoogleGemini#embed()
method Langchain::Assistant
works withLangchain::LLM::Anthropic
llm- New XLS file processor
- Fixes and improvements
- Better error handling for
Langchain::LLM::GoogleVertexAI
- New π οΈ
Langchain::Tool::NewsRetriever
tool to fetch news via newsapi.org - Langchain::Assistant works with
Langchain::LLM::GoogleVertexAI
andLangchain::LLM::GoogleGemini
llms - [BREAKING] Introduce new
Langchain::Messages::Base
abstraction
- Langchain::LLM::Ollama now uses
llama3
by default - Langchain::LLM::Anthropic#complete() now uses
claude-2.1
by default - Updated with new OpenAI models, including
gpt-4o
- New
Langchain::LLM::Cohere#chat()
method. - Introducing
UnifiedParameters
to unify parameters across LLM classes
- [BREAKING] Rename
dimension
parameter todimensions
everywhere
- New
Langchain::LLM::AWSBedrock#chat()
to wrap Bedrock Claude requests - New
Langchain::LLM::OllamaResponse#total_tokens()
method
- New
Langchain::Processors::Pptx
to 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::ReActAgent
andLangchain::Agent::SQLQueryAgent
classes - New
Langchain::Agent::FileSystem
tool 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::Conversation
class
- 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::Assistant
that will be replacingLangchain::Conversation
andLangchain::Agent
s. Langchain::Conversation
is deprecated.
- Introducing new
Langchain::Chunker::Markdown
chunker (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_rails
gem
- Elasticsearch vector search support
- Fix
lib/langchain/railtie.rb
not being loaded with the gem
- Introduce `Langchain::LLM::Response`` object
- Introduce
Langchain::Chunk
object - Add the ask() method to the Langchain::ActiveRecord::Hooks
- Bump weaviate and chroma-db deps
Langchain::Chunker::Semantic
chunker- Re-structure Conversations class
- Bug fixes
- HyDE-style similarity search
Langchain::Chunker::Sentence
chunker- Bug fixes
- Bump weaviate-ruby gem version
- Ollama support
- Add
find
method toLangchain::Vectorsearch::Qdrant
- Enhance Google search output
- Raise ApiError when OpenAI returns an error
- Update OpenAI
complete
method 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
ChainOfThoughtAgent
toReActAgent
- Implement A21 token validator
- Add
Langchain::OutputParsers
- Developer can modify models used when initiliazing
Langchain::LLM::*
clients - Improvements to the
SQLQueryAgent
and 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::Chat
toLangchain::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::Chat
interface 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::Xlsx
to 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::Docx
to parse .docx files
- Introduce
-
π Vectorsearch
- Introduce support for Chroma DB
-
π Loaders
- Bug fix
Loaders::Text
to only parse .txt files
- Bug fix
- π Loaders
- Introduce
Loaders::Text
to parse .txt files - Introduce
Loaders::PDF
to parse .pdf files
- Introduce
- π£οΈ LLMs
- Bump
hugging-face
gem version
- Bump
- Bug fixes
- π£οΈ LLMs
- Introducing support for HuggingFace
- Dependencies are now optionally loaded and required at runtime
- Start using
standardrb
for 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::Calculator
tool that solves mathematical expressions. - Introducing
Tool::Search
tool 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