patterns-ai-core / langchainrb

Build LLM-powered applications in Ruby
https://rubydoc.info/gems/langchainrb
MIT License
1.18k stars 156 forks source link

Exclude tiktoken_ruby from automatic max_tokens validation #649

Closed andreibondarev closed 4 weeks ago

night91 commented 3 weeks ago

@andreibondarev This is crashing: cannot load such file -- tiktoken_ruby as https://github.com/patterns-ai-core/langchainrb/blob/main/lib/langchain/utils/token_length/openai_validator.rb has a require for require "tiktoken_ruby".

andreibondarev commented 3 weeks ago

@night91 I'll take a look at it later today. If you need it sooner -- feel free to open a PR with a fix.