chatgpt-android  by skydoves

Android chatbot app using OpenAI's chat API with Stream Chat SDK

created 2 years ago
3,834 stars

Top 13.0% on sourcepulse

GitHubView on GitHub
Project Summary

This repository demonstrates an Android chatbot application leveraging OpenAI's ChatGPT API and the Stream Chat SDK for Compose. It targets Android developers seeking to integrate advanced conversational AI and real-time messaging features into their applications, showcasing modern Android architecture patterns and Jetpack Compose UI development.

How It Works

The application integrates OpenAI's chat API for natural language processing and Stream Chat SDK for Compose to provide a robust messaging infrastructure. It follows Google's official app architecture guidance, separating concerns into UI and data layers with unidirectional data flow. Key components include Jetpack Compose for UI, Hilt for dependency injection, Kotlin Coroutines and WorkManager for asynchronous operations, and Room for local data persistence.

Quick Start & Requirements

  • Install/Run: Build and run the Android project using Android Studio.
  • Prerequisites:
    • OpenAI API Key (requires verified phone number and minimum $5 expenditure for rate limits).
    • Stream API Key.
    • Create secrets.properties file in the project root with STREAM_API_KEY=... and GPT_API_KEY=....
    • Disable Stream authentication checks in the Stream dashboard.
  • Setup Time: 10-20 minutes.
  • Links: Stream Login, OpenAI API Dashboard

Highlighted Details

  • 100% Jetpack Compose UI.
  • Utilizes Kotlin Coroutines and Flow for asynchronous operations.
  • Integrates Stream Chat SDK for real-time messaging.
  • Follows Google's official architecture guidance and modularization strategies.
  • Includes image loading with Landscapist Glide.

Maintenance & Community

Licensing & Compatibility

  • Licensed under the Apache License, Version 2.0.
  • Permissive license suitable for commercial use and integration into closed-source applications.

Limitations & Caveats

The project is primarily a demonstration, with many features not yet completed beyond the core chat functionality. Users must manage API keys and potential costs associated with OpenAI usage. Troubleshooting guidance is provided for common API errors (401, 429).

Health Check
Last commit

4 days ago

Responsiveness

Inactive

Pull Requests (30d)
4
Issues (30d)
0
Star History
55 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.