Skip to content

Added Build Status badge #27

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 6 commits into from
Feb 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 43 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,62 @@
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/co.yml/ychatgpt/badge.svg)](https://maven-badges.herokuapp.com/maven-central/co.yml/ychatgpt/)
![Apache-2.0](https://img.shields.io/badge/license-Apache-blue)
![Build Status](https://github.com/yml-org/chatgpt-sdk/actions/workflows/test.yml/badge.svg?branch=main)
![Y-ChatGPT SDK](https://github.com/yml-org/chatgpt-sdk/raw/main/art/logo.png)

# YChatGPT (Working in Progress 🚧)

ChatGPT is a large language model developed by OpenAI that is trained to generate human-like text based on a given prompt or context.

YChatGPT aims to abstract all API call logic from ChatGPT for multiple platforms.
YChatGPT aims to abstract all API call logic from ChatGPT for multiple platforms. YChatGPT is a Kotlin Multiplatform (KMP) project, that generates artifacts for both iOS and Android.


## Android setup

Add the following line to import the library via Gradle. First, make sure Maven Central has been added:


```kotlin
repositories {
mavenCentral()
// ...
}
```

Then, simply import the dependency to your common source-set dependencies:

```kotlin
implementation("co.yml:ychatgpt:1.0.0")
```

In the snippet below, you can see how to initialize the object and perform a first search:


```kotlin
val yChatGpt by lazy {
YChatGpt.create("your-api-key")
}

try {
val result = yChatGpt.completion()
.setInput("Say this is a test.")
.saveHistory(false)
.setMaxTokens(1024)
.set... // you can set more parameters
.execute()

} catch (e: exception) {
// catch any error that may occurs on api call.
}
```

## 🤝 Contributions

Feel free to make a suggestion or if you find any error in this project, please open an issue. Make sure to read our [contribution guidelines](https://github.com/yml-org/chatgpt-sdk/blob/main/CONTRIBUTING.md) before.

## License

```
Copyright 2023 YChatGPT
Copyright 2023 YML

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Binary file added art/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.