Thanks for contributing to ai-chat! This gem is intentionally beginner-friendly, so please keep public-facing docs and examples simple and progressively introduced.
- Ruby:
~> 3.2(seeai-chat.gemspec) - Install dependencies:
bundle install
- Run unit specs:
bundle exec rspec - Integration specs make real API calls and require
OPENAI_API_KEY(they are skipped automatically if it’s not set). - Disable coverage locally (optional):
NO_COVERAGE=1 bundle exec rspec
- Format/lint:
bundle exec standardrb --fix - Smell checks (optional):
bundle exec reek
The examples/ directory is both documentation and a practical validation suite.
- Set
OPENAI_API_KEY(or create a.envfile in the repo root):OPENAI_API_KEY=your_openai_api_key_here
- Run a quick overview:
bundle exec ruby examples/01_quick.rb - Run everything:
bundle exec ruby examples/all.rb
- If you change the public API, update
README.md. - If you change behavior in a user-visible way, update
CHANGELOG.md. - Keep examples easy to paste into IRB; use short variable names (
a,b,c, …) to match existing style inexamples/.