Skip to content

Fix zeitwerk autoloading error for OpenAI scope#13

Merged
patvice merged 1 commit intopatvice:mainfrom
davidemerli:main
Jun 17, 2025
Merged

Fix zeitwerk autoloading error for OpenAI scope#13
patvice merged 1 commit intopatvice:mainfrom
davidemerli:main

Conversation

@davidemerli
Copy link
Contributor

Thanks for the convenient gem! 🎉
Been trying to get it to work in a production environment and had an issue with autoloading.

Here's my take on a fix

  • Add inflection rule for "openai" -> "OpenAI" to match ruby_llm's zeitwerk configuration
  • Rename directory from open_ai/ to openai/ for consistency with parent library
  • Update require path to match new directory structure

Resolves autoloading error: "expected file to define constant OpenAi::ComplexParameterSupport, but didn't"
Ensures naming consistency with https://github.com/crmne/ruby_llm/blob/a35aa111a0bb36b7f0363b1f1f2a25e3d5378fd3/lib/ruby_llm.rb#L16

…ntions

- Add inflection rule for "openai" -> "OpenAI" to match ruby_llm's zeitwerk configuration
- Rename directory from open_ai/ to openai/ for consistency with parent library
- Update require path to match new directory structure

Resolves autoloading error: "expected file to define constant OpenAi::ComplexParameterSupport, but didn't"
Ensures naming consistency with https://github.com/crmne/ruby_llm/blob/a35aa111a0bb36b7f0363b1f1f2a25e3d5378fd3/lib/ruby_llm.rb#L16
@patvice
Copy link
Owner

patvice commented Jun 17, 2025

Oops you are completely right, this makes complete sense! Thanks for the contribution! 😄

@patvice patvice merged commit 6f3d2c4 into patvice:main Jun 17, 2025
1 check passed
@patvice
Copy link
Owner

patvice commented Jun 17, 2025

I'll push up a patch fix to make it easy for you to pull down. Thanks again!

@davidemerli
Copy link
Contributor Author

Nice :) that was quick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants