myChatGPT is a project aimed at showcasing interactions with the OpenAI ChatGPT API using both Java and Python programming languages. This repository contains implementations of chatbots that communicate with the ChatGPT model to provide conversational responses to user input.
The project consists of two implementations:
-
Java Implementation: Utilizes Java to interact with the ChatGPT API via HTTP requests. It provides a simple command-line interface for users to ask questions and receive responses from the ChatGPT model.
-
Python Implementation: Utilizes Python with the OpenAI Python library to communicate with the ChatGPT API. Similar to the Java implementation, it offers a command-line interface for users to engage in conversation with the ChatGPT model.
- Interactive Chat: Users can interact with the ChatGPT model by typing questions or prompts into the command-line interface.
- Multi-Language Support: Both Java and Python implementations support interaction with the ChatGPT model in multiple languages.
- Customization: The project allows users to customize the chatbot's behavior and appearance according to their preferences.
- Efficient Communication: The implementations use HTTP requests to communicate with the ChatGPT API, ensuring efficient data transmission.
- Ensure you have Java installed on your system.
- Compile the
HttpRequestMultipleHeadersExample.java
file. - Run the compiled Java program.
- Follow the on-screen instructions to interact with the chatbot.
- Install the required Python dependencies by running
pip install openai
. - Set up your OpenAI API key. Instructions can be found here.
- Run the
chat_with_ChatGPT.py
Python script. - Input questions or prompts when prompted by the command-line interface.
- Usage Limitation: Be mindful of OpenAI's usage policies and limitations. Check your API usage regularly to avoid exceeding usage limits or incurring additional charges.
- Data Privacy: Avoid sharing sensitive or personal information when interacting with the chatbots.
- Responsibility: The developers of myChatGPT do not assume any responsibility for misuse of the ChatGPT API or any negative consequences resulting from such misuse.
Contributions to the myChatGPT project are welcome! If you have any suggestions, feature requests, or bug reports, feel free to open an issue or submit a pull request.