Open night91 opened 3 weeks ago
I ran into this yesterday within Github Actions. The gem specifies ruby_tiktoken as an optional dependency, but it looks like if your code is using the OpenAI adapter, ruby_tiktoken is required. The workaround/fix for me was just to explicitly add it to my Gemfile: bundle add tiktoken
@bknoles That would do it, buy then it should be in the docs.
Yeah, I wasn't suggesting it as a long term fix. Just wanted to document the workaround I used to keep my side project moving!
Describe the bug Cannot load such file -- tiktoken_ruby
File:
https://github.com/patterns-ai-core/langchainrb/blob/main/lib/langchain/utils/token_length/openai_validator.rb
has a require forrequire "tiktoken_ruby"
.This happen to me in Travis build running specs, launching rails server or running specs doesn't fail in my localhost.
To Reproduce Langchain::Utils::TokenLength::OpenAIValidator
Expected behavior An error about a missing dependency should not happen.
Terminal commands & output
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context Add any other context about the problem here.