Note: This is a demo application for the ChatGPT API. It is not intended for production use. This is the source code for the ChatGPT Basic Android Client app on YouTube: https://www.youtube.com/watch?v=56KtTc2oL-I
This repository contains the source code for a basic Android client for interacting with OpenAI's ChatGPT. It provides a simple UI that allows users to send messages to ChatGPT and receive responses in real-time. This app is designed to showcase the capabilities of ChatGPT and serve as a starting point for developers to build their own applications using the ChatGPT API.
- Simple and clean user interface
- Send messages to ChatGPT and receive responses in real-time
- Manage API keys for authenticating with ChatGPT API
- Settings for customizing API call parameters (e.g., response length, temperature)
- Android Studio
- Android SDK (minimum API level 21 - Lollipop)
- A valid API key from OpenAI for accessing the ChatGPT API
- Clone the repository
- Add your OpenAI API key in
OpenAIApi.kt
- Build and run the app on an emulator or a physical device.
- Launch the app on your device.
- Enter your message in the input field and press the send button.
- The app will send your message to ChatGPT and display the response in the chat window.
You can customize the ChatGPT API call parameters by accessing the settings page within the app. Some of the customizable parameters include:
max_tokens
: Limit the length of the response.temperature
: Control the randomness of the response (lower values make the response more focused and deterministic, while higher values make it more creative and diverse).