https://github.com/moraleswilll/small_chat
This is a simple Ruby application that connects to OpenAI's API and utilizes the ChatGPT-4o model to generate responses based on user input, it also gives the option to send the response via email having setup a valid mail account.
https://github.com/moraleswilll/small_chat
ai ruby ruby-on-rails
Last synced: about 2 months ago
JSON representation
This is a simple Ruby application that connects to OpenAI's API and utilizes the ChatGPT-4o model to generate responses based on user input, it also gives the option to send the response via email having setup a valid mail account.
- Host: GitHub
- URL: https://github.com/moraleswilll/small_chat
- Owner: MoralesWilll
- License: mit
- Created: 2024-12-03T16:25:56.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-26T02:22:32.000Z (over 1 year ago)
- Last Synced: 2025-04-04T00:17:39.106Z (about 1 year ago)
- Topics: ai, ruby, ruby-on-rails
- Language: Ruby
- Homepage:
- Size: 85 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Ruby OpenAI ChatGPT-4o App
Overview
This is a simple Ruby application that connects to OpenAI's API and utilizes the ChatGPT-4o model to generate responses based on user input, it also gives the option to send the response via email having setup a valid mail account.
Features
Connects to OpenAI's API
Sends prompts to ChatGPT-4o
Displays AI-generated responses or sends them as emails
Simple display and navigation
Prerequisites
Ensure you have the following installed:
Ruby 3.3.5
Bundler (gem install bundler)
An OpenAI API key
A valid email account and an app password
Installation
Clone the repository:
git clone https://github.com/MoralesWilll/small_chat.git
cd small_chat
Install dependencies:
bundle install
Set up environment variables:
Create a .env file in the root directory:
touch .env
Fill the fields in .env.erb with your variables
Usage
Run the Ruby app with bin/dev
navigate to the localhost:3000
Example
You: Hello, how are you?
AI: I'm just a bot, but I'm here to help! How can I assist you today?
Contributing
Feel free to fork this repository and submit pull requests with improvements!
License
This project is licensed under the MIT License.
Author
MoralesWilll