You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Langchain::DependencyHelper does not look in the gemspec dependencies of the current gem being developed, forcing LLM dependencies (e.g. aws-sdk-bedrockruntime) to be duplicated in the Gemfile as well.
To Reproduce
Create a gem depending on langchainrb with a .gemspec containing:
Observe this error when initializing a Langchain::LLM::AwsBedrock:
~/.gem/ruby/3.3.2/gems/langchainrb-0.19.1/lib/langchain/dependency_helper.rb:38:in `rescue in depends_on': Could not load aws-sdk-bedrockruntime. Please ensure that the aws-sdk-bedrockruntime gem is installed. (Langchain::DependencyHelper::LoadError)
from ~/.gem/ruby/3.3.2/gems/langchainrb-0.19.1/lib/langchain/dependency_helper.rb:17:in `depends_on'
from ~/.gem/ruby/3.3.2/gems/langchainrb-0.19.1/lib/langchain/llm/aws_bedrock.rb:46:in `initialize'
from bin/console:36:in `new'
from bin/console:36:in `<main>'
To resolve, one must add aws-sdk-bedrockruntime to the Gemfile, as the .gemspec is not consulted in Langchain::DependencyHelper.
Expected behavior
Expected DependencyHelper to find dependencies listed in the gemspec of the gem which depends on langchainrb.
The text was updated successfully, but these errors were encountered:
Describe the bug
Consider a gem which depends on
langchainrb
.Langchain::DependencyHelper
does not look in the gemspec dependencies of the current gem being developed, forcing LLM dependencies (e.g.aws-sdk-bedrockruntime
) to be duplicated in theGemfile
as well.To Reproduce
Create a gem depending on
langchainrb
with a.gemspec
containing:Observe this error when initializing a
Langchain::LLM::AwsBedrock
:To resolve, one must add
aws-sdk-bedrockruntime
to theGemfile
, as the.gemspec
is not consulted inLangchain::DependencyHelper
.Expected behavior
Expected
DependencyHelper
to find dependencies listed in the gemspec of the gem which depends onlangchainrb
.The text was updated successfully, but these errors were encountered: