- About this App
- Production Sites
- Associated Repos
- Ruby Version
- System dependencies
- Configuration
- Tests
- Services
- OpenAi API Key
- Endpoints
- Contributors
This application is built as a microservice to handle communications with OpenAi specifically in the search for assistive technologies. A FE app or other service can call the endpoints to get data on technologies that can assist individuals with different kinds of disabilities. Data is formatted for ease of use by breaking each technology down into a different object with attributes describing the tech.
ruby 3.2.2
- Dependencies are contained in Gemfile, run
bundle
after cloning repo to install all dependencies
- After cloning repo to your own directory run commands in terminal:
bundle install
rails db:create
- To run the server in development env:
rails s
- to run the test run in terminal:
bundle exec rspec
- Uses OpenAi as a chat service to get back dynamic responses on technologies, can easily be swapped out for another Ai chat services by modifying the base endpoint contained in services/ai_service.rb
Get your own OpenAi api key here https://openai.com/
- create an account or log-in, then request a new api_key through their dashboard
- Hide your new key by typing
EDITOR="code --wait" rails credentials:edit
- when the file opens save your new key as
open_ai:
key: "Your key here"
Sign up for a Twilio free trial here
- you will need an account-sid, auth-token, and a phone number
- hide this by typing
EDITOR="code --wait" rails credentials:edit
- when the file opens save your new information as
twilio:
account_sid: ACCOUNT_SID_HERE
auth_token: ACCOUNT_TOKEN_HERE
phone_number: PHONE_NUMBER_HERE
- pass params in the body of the request
- required params {"tech_needs":[], "disability_description": []}
- even if only 1 parameter is submitted the value for each key must be an Array
- returns assistive technologies that the AI finds for the given tech needs and disability description
example response:
example request:
{
"user_phone_number": "+13038830579",
"title": "NVDA (NonVisual Desktop Access)"
}
- pass in the user's phone number and title of the tech
- receieve text message with more detailed information about a tech
successful response:
{
"message": "Message successfully sent!"
}
DISCLAIMER: Due to the nature of trial Twilio accounts this currently only works when sending to a specific number (one that has been verified). In order to be useful in a larger instance the account would need to be taken out of trial mode.
- pass 1 parameter as a query parameter {tech: "name of technology"}
- returns more detailed information for the queried technology from OpenAi
example response:
- Nick Spencer @github.com/deadbert
- Joop Stark @github.com/JoopStart
- Eliza Keating @github.com/elizakeating