This project is an attempt to develop a chatbot app, using Ruby on Rails and an API call from a Large Language Model such as OpenAI (ChtGTP) and Meta (Ollama)
System | Install Command | Version |
---|---|---|
ruby | ruby -v |
3.3.0 |
rails | rails -v |
7.0.8.4 |
redis | redis-cli -v |
6.0.16 |
postgreSQL | psql -V |
14.12 |
cd
into your app directory and run those install commands--database=DB_YOU_WANT_TO_USE
.Gem | Install Command | Gem Version |
---|---|---|
devise | bundle add devise |
4.2 |
foreman | bundle add foreman |
0.87.2 |
redis | bundle add redis |
5.2 |
postgreSQL | bundle add pg |
1.5 |
sidekiq | bundle add sidekiq |
7.1 |
ruby-openAI | bundle add ruby-openai |
7.1 |
git clone https://github.com/your-username/chatbot-llm.git
cd chatbot-llm
bundle install
bin/rails db:prepare
or bin/rails db:create db:migrate
.env
file with you redis url and port..env
file by default, but it's good practice to add to do so..env
file inside your application directory by runnin touch .env
, populate it with your API KEY from OpenAI and redis (port, URL), should look something like:REDIS_PORT=xxxxx
REDIS_URL=xxxxx
OPENAI_API_KEY=sk=xxxxxxxxxxxxx
Note: save your API KEY in a safe place do not share it, also OPENAI does not let you copy your key a second time.
Then into your app directory and run echo "/ .env" >> .gitignore"
, this will ensure your environment configurations does not go to your public repository.
Run: bin/rails s
to start
To start the server with foreman i recomend reading this gide
///// construction in progress /////