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
The CreateModels schema migration currently has a data migration mixed in:
say_with_time"Loading models from models.json"doRubyLLM.models.load_from_json!Model.save_to_databaseend
Having mixed type migrations (data and schema) is usually a code smell. Puritanism aside, it led me to an real world problem: I'm moving from ruby-openai to ruby_llm, and my test suite is failing because test envs typically do db:schema:load, skipping the data migration. So I get RubyLLM::ModelNotFoundError: Unknown model: gpt-4o-mini errors because the table is empty.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
The CreateModels schema migration currently has a data migration mixed in:
Having mixed type migrations (data and schema) is usually a code smell. Puritanism aside, it led me to an real world problem: I'm moving from ruby-openai to ruby_llm, and my test suite is failing because test envs typically do db:schema:load, skipping the data migration. So I get
RubyLLM::ModelNotFoundError: Unknown model: gpt-4o-minierrors because the table is empty.Beta Was this translation helpful? Give feedback.
All reactions