Skip to content

Commit

Permalink
Change project name to ychat
Browse files Browse the repository at this point in the history
  • Loading branch information
osugikoji committed Feb 24, 2023
1 parent 9a23021 commit e682b87
Show file tree
Hide file tree
Showing 77 changed files with 404 additions and 448 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
run: ./gradlew checkSwiftPackageVersion
## Step 4
- name: Run Detekt
run: ./gradlew :chat-gpt:detektMetadataMain
run: ./gradlew :ychat:detektMetadataMain
## Step 5
- name: Run Ktlint
run: ./gradlew :chat-gpt:ktlintCheck
run: ./gradlew :ychat:ktlintCheck

code-coverage:
name: Code Coverage
Expand All @@ -52,7 +52,7 @@ jobs:
path: "**/build/reports/tests/testDebugUnitTest"
## Step 5
- name: Run Kover Report
run: ./gradlew :chat-gpt:koverXmlReport
run: ./gradlew :ychat:koverXmlReport
## Step 6
- name: Upload coverage reports
uses: codecov/codecov-action@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Publish to Repository
run: ./gradlew :chat-gpt:clean publishReleasePublicationToYChatGPTRepository
run: ./gradlew :ychat:clean publishReleasePublicationToYChatRepository

env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
Expand Down
10 changes: 5 additions & 5 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
import PackageDescription

let package = Package(
name: "YChatGPT",
name: "YChat",
platforms: [
.iOS(.v13)
],
products: [
.library(
name: "YChatGPT",
targets: ["YChatGPT"]
name: "YChat",
targets: ["YChat"]
),
],
targets: [
.binaryTarget(
name: "YChatGPT",
path: "./YChatGPT.xcframework"
name: "YChat",
path: "./YChat.xcframework"
),
]
)
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/co.yml/ychatgpt/badge.svg)](https://maven-badges.herokuapp.com/maven-central/co.yml/ychatgpt/)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/co.yml/ychat/badge.svg)](https://maven-badges.herokuapp.com/maven-central/co.yml/ychat/)
![Apache-2.0](https://img.shields.io/badge/license-Apache-blue)
![Build Status](https://github.com/yml-org/ychatgpt-sdk/actions/workflows/test.yml/badge.svg?branch=main)
![Y-ChatGPT SDK](https://github.com/yml-org/ychatgpt-sdk/raw/main/art/logo.png)
![Build Status](https://github.com/yml-org/ychat/actions/workflows/test.yml/badge.svg?branch=main)
![Y-Chat](https://github.com/yml-org/ychat/raw/main/art/logo.png)

# YChatGPT
# YChat

YChatGPT is a Kotlin Multiplatform (KMP) project that provides a simple API for integrating the powerful ChatGPT language model developed by OpenAI into mobile applications running on both iOS and Android. The goal of this project is to abstract all the API call logic from ChatGPT, allowing developers to easily leverage the capabilities of the language model in their mobile applications.
YChat is a Kotlin Multiplatform (KMP) project that provides a simple API for integrating the powerful ChatGPT language model developed by OpenAI into mobile applications running on both iOS and Android. The goal of this project is to abstract all the API call logic from ChatGPT, allowing developers to easily leverage the capabilities of the language model in their mobile applications.

The repository contains the source code for the YChatGPT library, along with examples and documentation for getting started with the library. The YChatGPT library provides a consistent interface for interacting with ChatGPT, regardless of the platform, and makes it easy to generate human-like text based on a given prompt or context.
The repository contains the source code for the YChat library, along with examples and documentation for getting started with the library. The YChat library provides a consistent interface for interacting with ChatGPT, regardless of the platform, and makes it easy to generate human-like text based on a given prompt or context.

The library uses Kotlin Multiplatform to generate artifacts for both iOS and Android, allowing developers to write code once and use it on both platforms. The project is open source and actively maintained, with contributions from the community encouraged. Overall, YChatGPT provides a convenient and powerful way for mobile developers to incorporate the advanced natural language processing capabilities of ChatGPT into their applications.
The library uses Kotlin Multiplatform to generate artifacts for both iOS and Android, allowing developers to write code once and use it on both platforms. The project is open source and actively maintained, with contributions from the community encouraged. Overall, YChat provides a convenient and powerful way for mobile developers to incorporate the advanced natural language processing capabilities of ChatGPT into their applications.


## iOS setup

- Go to your project’s file settings and click "Add Package":

![Y-ChatGPT iOS first screenshot](https://github.com/yml-org/ychatgpt-sdk/raw/main/art/ios-1.png)
![Y-ChatGPT iOS first screenshot](https://github.com/yml-org/ychat/raw/main/art/ios-1.png)

- To add a new package, search for https://github.com/yml-org/ychatgpt-sdk.git in the top right corner:
- To add a new package, search for https://github.com/yml-org/ychat.git in the top right corner:

![Y-ChatGPT iOS second screenshot](https://github.com/yml-org/ychatgpt-sdk/raw/main/art/ios-2.png)
![Y-ChatGPT iOS second screenshot](https://github.com/yml-org/ychat/raw/main/art/ios-2.png)

Once you have found the package click the "Add Package" button to add it to your project. Now you can start using the SDK in your iOS project!

See the code snippet below on how to initialize and use it:

```swift
var yChatGpt: YChatGpt {
YChatGptCompanion.shared.create(apiKey: "your-api-key")
var yChat: YChat {
YChatCompanion.shared.create(apiKey: "your-api-key")
}

do {
Expand Down Expand Up @@ -58,19 +58,19 @@ repositories {
Then, simply import the dependency to your common source-set dependencies:

```kotlin
implementation("co.yml:ychatgpt:1.0.0")
implementation("co.yml:ychat: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")
val yChat by lazy {
YChat.create("your-api-key")
}

try {
val result = yChatGpt.completion()
val result = yChat.completion()
.setInput("Say this is a test.")
.saveHistory(false)
.setMaxTokens(1024)
Expand All @@ -84,7 +84,7 @@ try {

## 🤝 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/ychatgpt-sdk/blob/main/CONTRIBUTING.md) before.
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/ychat/blob/main/CONTRIBUTING.md) before.

## License

Expand Down
Binary file added YChat-1.0.0.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
<key>AvailableLibraries</key>
<array>
<dict>
<key>DebugSymbolsPath</key>
<string>dSYMs</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>YChatGPT.framework</string>
<string>YChat.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
Expand All @@ -19,12 +17,10 @@
<string>ios</string>
</dict>
<dict>
<key>DebugSymbolsPath</key>
<string>dSYMs</string>
<key>LibraryIdentifier</key>
<string>ios-x86_64-simulator</string>
<key>LibraryPath</key>
<string>YChatGPT.framework</string>
<string>YChat.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>x86_64</string>
Expand Down
Loading

0 comments on commit e682b87

Please sign in to comment.