Skip to content

belinwu/Gemini_AI_CMP_Chat_Library

 
 

Repository files navigation

Gamini AI Chat CMP Library

Gemini Chat Library is a multiplatform library built for Compose Multiplatform, enabling developers to easily integrate Gemini chat functionality into their Android and desktop applications.

🛠️ Prerequisites 🛠️

IDE

You can either use IntelliJ IDEA or Android Studio.

For Gemini AI.

Gemini Api Key

You can get your key here Google AI Studio and pass it to the pass screen function.

Supported Platforms(Currently...)

  1. Android

  2. Desktop

Installation

Add the following dependency to your project's build.gradle file:

dependencies {
    implementation("io.github.samaricha:chatSDK:0.0.1")
}

Usage

Initialization

Initialize the Gemini chat Screen in your application:

        ChatScreen(
            geminiKey = BuildKonfig.API_KEY,
            mainTitle = "OrganiksKMP",
            subTitle = "by aricha",
            brandingImg = painterResource(Res.drawable.organiks_egg)
        )

Screenshots

Built with

  • Kotlin Multiplatform - The Kotlin Multiplatform technology is designed to simplify the development of cross-platform projects.
  • Compose Multiplatform - a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
  • Ktor Client - a multiplatform asynchronous HTTP client, which allows you to make requests and handle responses.
  • Gemini AI - a multi-modal large language model(LLM) developed by Google DeepMind.
  • Koin - The pragmatic Kotlin & Kotlin Multiplatform Dependency Injection framework.
  • Kotlinx-serilization - Kotlin multiplatform / multi-format serialization.
  • VannikTech - Gradle plugin that creates a publish task to automatically upload all of your Java, Kotlin or Android libraries to any Maven instance.
  • NMCP - A plugin that uses the new Central Portal publisher API to publish to Maven Central.
  • Dokka - Dokka is an API documentation engine for Kotlin.

License

Copyright (c) 2024 Aricha Samson

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.

About

A Chat SDK based on Gemini for Compose Multiplatform currently supporting Android and Desktop.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 100.0%