Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/theartifulprogrammer/isha
Isha
https://github.com/theartifulprogrammer/isha
Last synced: about 19 hours ago
JSON representation
Isha
- Host: GitHub
- URL: https://github.com/theartifulprogrammer/isha
- Owner: TheArtifulProgrammer
- Created: 2024-03-01T05:00:29.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-03-01T05:01:40.000Z (10 months ago)
- Last Synced: 2024-11-10T11:33:28.341Z (about 2 months ago)
- Language: Python
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Therapy Bot using Flask and GPT-3.5-Turbo
This is a therapy bot built using Flask and GPT-3.5-Turbo. The bot is designed to provide therapy assistance to users by answering their questions in a friendly and engaging manner.
## Usage
1. **Installation**:
- Clone this repository.
- Install the required dependencies using `pip install -r requirements.txt`.
- Create a `.env` file and add your OpenAI API key.2. **Setting Up**:
- Make sure you have your OpenAI API key. If not, you can get it from [OpenAI](https://openai.com/).
- Update the `.env` file with your OpenAI API key.3. **Run the Application**:
- Run the Flask application using `python app.py`.
- Visit `http://localhost:5000` in your web browser.4. **Interacting with the Bot**:
- Send POST requests to `http://localhost:5000/hi/isha` with JSON payload containing the user's question.
- The bot will respond with therapy assistance based on the question.## Code Structure
The code is structured as follows:
- `app.py`: Contains the Flask application setup and routes for handling user requests.
- `isha.py`: Defines the `Isha` class responsible for interacting with the OpenAI GPT-3.5-Turbo model and providing therapy assistance.
- `index.html`: Provides a simple interface for interacting with the bot (optional).## Dependencies
- Flask
- Flask-CORS
- python-dotenv
- openai## API Endpoints
- `POST /hi/isha`: Accepts a JSON payload with a user's question and returns the bot's response.
## Configuration
Make sure to set up your environment variables properly:
```dotenv
OPENAI_API_KEY=your_openai_api_key```
## Disclaimer
This bot is intended for educational and demonstrative purposes only. It is not a substitute for professional therapy or medical advice. Use it at your own discretion.