Project

gromit

0.01
No release in over a year
gromit uses Redis and OpenAI embeddings to index your documentation
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

Gromit

Your documentation search assitant

Usage

Make sure to provide your OpenAI token using the OPENAPI_ACCESS_TOKEN environment variable.

To mount the Gromit engine in Rails 7, require the engine from your Gemfile:

gem "gromit", require: "gromit/engine"

And add this line to your routes:

Rails.application.routes.draw do
  mount Gromit::Engine => "/"
end

Gromit provides the following routes:

Routes for Gromit::Engine:
healthcheck GET  /healthcheck(.:format) gromit/gromit#healthcheck {:format=>:json}
     search POST /search(.:format)      gromit/gromit#search {:format=>:json}
     upsert POST /upsert(.:format)      gromit/gromit#upsert {:format=>:json}

To index your documentation locally you can use gromit-reindexer. This will update redis-stack-server running on your machine.

bundle exec gromit-reindexer -s /path/to/your/docs

To remotely upsert your documentation you can use gromit-uploader.

BASE_URL=https://gromit-rails.example.com bundle exec gromit-uploader -s /path/to/your/docs

For a working example of a Rails 7 application using Gromit check out: https://github.com/releasehub-com/gromit-example

Installation

Add this line to your application's Gemfile:

gem "gromit"

And then execute:

$ bundle

Or install it yourself as:

$ gem install gromit

Contributing

Contribution directions go here.

License

The gem is available as open source under the terms of the MIT License.


Made with love by the folks @ release.com