Skip to content

Commit 173a5fa

Browse files
Deprecate Langchain::LLM::AI21 class (#962)
1 parent 88eea0a commit 173a5fa

File tree

5 files changed

+3
-3
lines changed

5 files changed

+3
-3
lines changed

.env.example

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
AI21_API_KEY=
21
ANTHROPIC_API_KEY=
32
AZURE_API_KEY=
43
AZURE_CHAT_URI=

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
- [BUGFIX] [https://github.com/patterns-ai-core/langchainrb/pull/953] Handle nil response in OpenAI LLM streaming
1616
- [BREAKING] [https://github.com/patterns-ai-core/langchainrb/pull/956] Deprecate `Langchain::Vectorsearch::Epsilla` class
1717
- [BREAKING] [https://github.com/patterns-ai-core/langchainrb/pull/961] Deprecate `Langchain::LLM::LlamaCpp` class
18+
- [BREAKING] [https://github.com/patterns-ai-core/langchainrb/pull/962] Deprecate `Langchain::LLM::AI21` class
1819

1920
## [0.19.4] - 2025-02-17
2021
- [BREAKING] [https://github.com/patterns-ai-core/langchainrb/pull/894] Tools can now output image_urls, and all tool output must be wrapped by a tool_response() method

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ The `Langchain::LLM` module provides a unified interface for interacting with va
5757

5858
## Supported LLM Providers
5959

60-
- AI21
6160
- Anthropic
6261
- AWS Bedrock
6362
- Azure OpenAI

lib/langchain/llm/ai21.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ class AI21 < Base
1717
}.freeze
1818

1919
def initialize(api_key:, default_options: {})
20+
Langchain.logger.warn "DEPRECATED: `Langchain::LLM::AI21` is deprecated, and will be removed in the next major version. Please use another LLM provider."
21+
2022
depends_on "ai21"
2123

2224
@client = ::AI21::Client.new(api_key)

lib/langchain/llm/base.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ class ApiError < StandardError; end
77
#
88
# Langchain.rb provides a common interface to interact with all supported LLMs:
99
#
10-
# - {Langchain::LLM::AI21}
1110
# - {Langchain::LLM::Anthropic}
1211
# - {Langchain::LLM::Azure}
1312
# - {Langchain::LLM::Cohere}

0 commit comments

Comments
 (0)