Project Overview: Compose ChatGPT Kotlin - Android Chatbot
Compose ChatGPT Kotlin is an open-source bot application crafted for Android devices using Jetpack Compose—an innovative approach by Google to design user interfaces—and Kotlin, a modern programming language. This chatbot app harmonizes with OpenAI's GPT-3 and GPT-4 APIs to produce conversational responses that mimic human interaction intents.
Key Highlights
- User-Friendly & Customizable: Designed with ease of use in mind, this app allows for a high level of customization, enabling developers to integrate Chatbot functions into existing Android applications seamlessly.
- Modern Development Tools: It leverages contemporary Android development tools and methodologies such as:
- Jetpack Compose for crafting user-friendly interfaces.
- Kotlin Coroutines for managing asynchronous programming processes.
- Dagger Hilt for seamless dependency injection management.
- Intelligent Conversations: Utilizes the capabilities of OpenAI's GPT-3 and GPT-4 to produce intelligent chat responses.
Project Structure and Code Quality
The project boasts a systematic folder hierarchy, which simplifies codebase navigation and comprehension. The source code is meticulously documented and adheres to leading practices for clean, maintainable coding.
Getting Started
To embark on using the Compose ChatGPT Kotlin, follow these steps:
- Clone the Repository: Obtain the code onto your local machine.
- Firebase Setup: Establish your Firebase environment and situate the
google-services.json
file within theapp
directory. - OpenAI API Key Acquisition: Secure an API key from OpenAI, essential for accessing their services.
- Configuration: Input your acquired API key into
Constants.kt
located atapp/src/main/java/com/chatgptlite/wanted/constants
. - Run the App: Compile and execute the application on either an emulator or a physical Android device.
Directory Layout
The application’s structure is neatly organized:
- Main Components:
constants
: Stores constant values utilized across the application.data
: Captures data layers inclusive of repositories and data origins.di
: Contains the Dependency Injection setup.helpers
: Houses utility classes.models
: Entails data models.ui
: Encompasses user interface elements like Activities, Fragments, and Composables.MainActivity.kt
&MainViewModel.kt
: Central files for the application's main activity and view model functionalities.
Features
- Enable new chat initiation and save chat history.
- Chat with GPT-3.5 turbo, GPT-4, and other text models.
- Pause text generation or delete conversations.
- Future settings to adjust ChatGPT configurations and select between Light/Dart themes.
Acknowledgments
This project acknowledges several key technologies and resources contributing to its development, such as Jetpack Compose, Retrofit, the OpenAI GPT-3 API, and Kotlin Coroutines.
Contributions & Support
Compose ChatGPT Kotlin invites open collaboration. Enthusiasts can contribute through pull requests or report issues. Any inquiries or suggestions can be directed to [email protected].
License
Licensed under the MIT License, which permits freedom to use, copy, and modify the software under stipulated conditions, while disclaiming any warranties on the software use.
Compose ChatGPT Kotlin stands as a testament to modern Android application development, showcasing integration of latest technologies to deliver sophisticated and customizable chatbot functionalities.