Skip to content

Commit 11651fe

Browse files
committed
chore: upgrade library version
1 parent d3aeb53 commit 11651fe

File tree

13 files changed

+184
-6
lines changed

13 files changed

+184
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ repositories {
5959
Then, simply import the dependency to your `build.gradle` dependencies:
6060

6161
```kotlin
62-
implementation("co.yml:ychat:1.0.0")
62+
implementation("co.yml:ychat:1.1.0")
6363
```
6464

6565
Take a look at the Kotlin code snippet below for an example of how to initialize and use one of the supported features:

YChat-1.0.0.zip

-8.17 MB
Binary file not shown.

YChat-1.1.0.zip

10.7 MB
Binary file not shown.

YChat.xcframework/Info.plist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
<key>AvailableLibraries</key>
66
<array>
77
<dict>
8+
<key>DebugSymbolsPath</key>
9+
<string>dSYMs</string>
810
<key>LibraryIdentifier</key>
911
<string>ios-arm64</string>
1012
<key>LibraryPath</key>
@@ -17,6 +19,8 @@
1719
<string>ios</string>
1820
</dict>
1921
<dict>
22+
<key>DebugSymbolsPath</key>
23+
<string>dSYMs</string>
2024
<key>LibraryIdentifier</key>
2125
<string>ios-x86_64-simulator</string>
2226
<key>LibraryPath</key>

YChat.xcframework/ios-arm64/YChat.framework/Headers/YChat.h

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
#import <Foundation/NSString.h>
77
#import <Foundation/NSValue.h>
88

9-
@class YChatKotlinThrowable, YChatYChatCompanion, YChatKotlinArray<T>, YChatKotlinException, YChatKotlinRuntimeException, YChatKotlinIllegalStateException;
9+
@class YChatKotlinThrowable, YChatYChatCompanion, YChatChatMessage, YChatKotlinArray<T>, YChatKotlinException, YChatKotlinRuntimeException, YChatKotlinIllegalStateException;
1010

11-
@protocol YChatCompletion, YChatYChat, YChatYChatCallback, YChatKotlinIterator;
11+
@protocol YChatChatCompletions, YChatCompletion, YChatEdits, YChatImageGenerations, YChatYChat, YChatYChatCallback, YChatKotlinIterator;
1212

1313
NS_ASSUME_NONNULL_BEGIN
1414
#pragma clang diagnostic push
@@ -147,7 +147,10 @@ __attribute__((swift_name("KotlinBoolean")))
147147
__attribute__((swift_name("YChat")))
148148
@protocol YChatYChat
149149
@required
150+
- (id<YChatChatCompletions>)chatCompletions __attribute__((swift_name("chatCompletions()")));
150151
- (id<YChatCompletion>)completion __attribute__((swift_name("completion()")));
152+
- (id<YChatEdits>)edits __attribute__((swift_name("edits()")));
153+
- (id<YChatImageGenerations>)imageGenerations __attribute__((swift_name("imageGenerations()")));
151154
@end
152155

153156
__attribute__((swift_name("YChatCallback")))
@@ -172,6 +175,20 @@ __attribute__((swift_name("YChatCompanion")))
172175
- (id<YChatYChat>)createApiKey:(NSString *)apiKey __attribute__((swift_name("create(apiKey:)")));
173176
@end
174177

178+
__attribute__((objc_subclassing_restricted))
179+
__attribute__((swift_name("ChatMessage")))
180+
@interface YChatChatMessage : YChatBase
181+
- (instancetype)initWithRole:(NSString *)role content:(NSString *)content __attribute__((swift_name("init(role:content:)"))) __attribute__((objc_designated_initializer));
182+
- (NSString *)component1 __attribute__((swift_name("component1()"))) __attribute__((deprecated("use corresponding property instead")));
183+
- (NSString *)component2 __attribute__((swift_name("component2()"))) __attribute__((deprecated("use corresponding property instead")));
184+
- (YChatChatMessage *)doCopyRole:(NSString *)role content:(NSString *)content __attribute__((swift_name("doCopy(role:content:)")));
185+
- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)")));
186+
- (NSUInteger)hash __attribute__((swift_name("hash()")));
187+
- (NSString *)description __attribute__((swift_name("description()")));
188+
@property (readonly) NSString *content __attribute__((swift_name("content")));
189+
@property (readonly) NSString *role __attribute__((swift_name("role")));
190+
@end
191+
175192
__attribute__((swift_name("KotlinThrowable")))
176193
@interface YChatKotlinThrowable : YChatBase
177194
- (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer));
@@ -209,6 +226,24 @@ __attribute__((swift_name("ChatGptException")))
209226
@property YChatInt * _Nullable statusCode __attribute__((swift_name("statusCode")));
210227
@end
211228

229+
__attribute__((swift_name("ChatCompletions")))
230+
@protocol YChatChatCompletions
231+
@required
232+
- (id<YChatChatCompletions>)addMessageRole:(NSString *)role content:(NSString *)content __attribute__((swift_name("addMessage(role:content:)")));
233+
234+
/**
235+
* @note This method converts instances of CancellationException, ChatGptException to errors.
236+
* Other uncaught Kotlin exceptions are fatal.
237+
*/
238+
- (void)executeContent:(NSString *)content completionHandler:(void (^)(NSArray<YChatChatMessage *> * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("execute(content:completionHandler:)")));
239+
- (void)executeContent:(NSString *)content callback:(id<YChatYChatCallback>)callback __attribute__((swift_name("execute(content:callback:)")));
240+
- (id<YChatChatCompletions>)setMaxResultsResults:(int32_t)results __attribute__((swift_name("setMaxResults(results:)")));
241+
- (id<YChatChatCompletions>)setMaxTokensTokens:(int32_t)tokens __attribute__((swift_name("setMaxTokens(tokens:)")));
242+
- (id<YChatChatCompletions>)setModelModel:(NSString *)model __attribute__((swift_name("setModel(model:)")));
243+
- (id<YChatChatCompletions>)setTemperatureTemperature:(double)temperature __attribute__((swift_name("setTemperature(temperature:)")));
244+
- (id<YChatChatCompletions>)setTopPTopP:(double)topP __attribute__((swift_name("setTopP(topP:)")));
245+
@end
246+
212247
__attribute__((swift_name("Completion")))
213248
@protocol YChatCompletion
214249
@required
@@ -227,6 +262,38 @@ __attribute__((swift_name("Completion")))
227262
- (id<YChatCompletion>)setTopPTopP:(double)topP __attribute__((swift_name("setTopP(topP:)")));
228263
@end
229264

265+
__attribute__((swift_name("Edits")))
266+
@protocol YChatEdits
267+
@required
268+
269+
/**
270+
* @note This method converts instances of CancellationException, ChatGptException to errors.
271+
* Other uncaught Kotlin exceptions are fatal.
272+
*/
273+
- (void)executeInstruction:(NSString *)instruction completionHandler:(void (^)(NSArray<NSString *> * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("execute(instruction:completionHandler:)")));
274+
- (void)executeInstruction:(NSString *)instruction callback:(id<YChatYChatCallback>)callback __attribute__((swift_name("execute(instruction:callback:)")));
275+
- (id<YChatEdits>)setInputInput:(NSString *)input __attribute__((swift_name("setInput(input:)")));
276+
- (id<YChatEdits>)setModelModel:(NSString *)model __attribute__((swift_name("setModel(model:)")));
277+
- (id<YChatEdits>)setResultsResults:(int32_t)results __attribute__((swift_name("setResults(results:)")));
278+
- (id<YChatEdits>)setTemperatureTemperature:(double)temperature __attribute__((swift_name("setTemperature(temperature:)")));
279+
- (id<YChatEdits>)setTopPTopP:(double)topP __attribute__((swift_name("setTopP(topP:)")));
280+
@end
281+
282+
__attribute__((swift_name("ImageGenerations")))
283+
@protocol YChatImageGenerations
284+
@required
285+
286+
/**
287+
* @note This method converts instances of CancellationException, ChatGptException to errors.
288+
* Other uncaught Kotlin exceptions are fatal.
289+
*/
290+
- (void)executePrompt:(NSString *)prompt completionHandler:(void (^)(NSArray<NSString *> * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("execute(prompt:completionHandler:)")));
291+
- (void)executePrompt:(NSString *)prompt callback:(id<YChatYChatCallback>)callback __attribute__((swift_name("execute(prompt:callback:)")));
292+
- (id<YChatImageGenerations>)setResponseFormatResponseFormat:(NSString *)responseFormat __attribute__((swift_name("setResponseFormat(responseFormat:)")));
293+
- (id<YChatImageGenerations>)setResultsResults:(int32_t)results __attribute__((swift_name("setResults(results:)")));
294+
- (id<YChatImageGenerations>)setSizeSize:(NSString *)size __attribute__((swift_name("setSize(size:)")));
295+
@end
296+
230297
__attribute__((objc_subclassing_restricted))
231298
__attribute__((swift_name("KotlinArray")))
232299
@interface YChatKotlinArray<T> : YChatBase
Binary file not shown.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>English</string>
7+
<key>CFBundleIdentifier</key>
8+
<string>com.apple.xcode.dsym.co.yml.ychat.YChat</string>
9+
<key>CFBundleInfoDictionaryVersion</key>
10+
<string>6.0</string>
11+
<key>CFBundlePackageType</key>
12+
<string>dSYM</string>
13+
<key>CFBundleSignature</key>
14+
<string>????</string>
15+
<key>CFBundleShortVersionString</key>
16+
<string>1.0</string>
17+
<key>CFBundleVersion</key>
18+
<string>1</string>
19+
</dict>
20+
</plist>

YChat.xcframework/ios-x86_64-simulator/YChat.framework/Headers/YChat.h

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
#import <Foundation/NSString.h>
77
#import <Foundation/NSValue.h>
88

9-
@class YChatKotlinThrowable, YChatYChatCompanion, YChatKotlinArray<T>, YChatKotlinException, YChatKotlinRuntimeException, YChatKotlinIllegalStateException;
9+
@class YChatKotlinThrowable, YChatYChatCompanion, YChatChatMessage, YChatKotlinArray<T>, YChatKotlinException, YChatKotlinRuntimeException, YChatKotlinIllegalStateException;
1010

11-
@protocol YChatCompletion, YChatYChat, YChatYChatCallback, YChatKotlinIterator;
11+
@protocol YChatChatCompletions, YChatCompletion, YChatEdits, YChatImageGenerations, YChatYChat, YChatYChatCallback, YChatKotlinIterator;
1212

1313
NS_ASSUME_NONNULL_BEGIN
1414
#pragma clang diagnostic push
@@ -147,7 +147,10 @@ __attribute__((swift_name("KotlinBoolean")))
147147
__attribute__((swift_name("YChat")))
148148
@protocol YChatYChat
149149
@required
150+
- (id<YChatChatCompletions>)chatCompletions __attribute__((swift_name("chatCompletions()")));
150151
- (id<YChatCompletion>)completion __attribute__((swift_name("completion()")));
152+
- (id<YChatEdits>)edits __attribute__((swift_name("edits()")));
153+
- (id<YChatImageGenerations>)imageGenerations __attribute__((swift_name("imageGenerations()")));
151154
@end
152155

153156
__attribute__((swift_name("YChatCallback")))
@@ -172,6 +175,20 @@ __attribute__((swift_name("YChatCompanion")))
172175
- (id<YChatYChat>)createApiKey:(NSString *)apiKey __attribute__((swift_name("create(apiKey:)")));
173176
@end
174177

178+
__attribute__((objc_subclassing_restricted))
179+
__attribute__((swift_name("ChatMessage")))
180+
@interface YChatChatMessage : YChatBase
181+
- (instancetype)initWithRole:(NSString *)role content:(NSString *)content __attribute__((swift_name("init(role:content:)"))) __attribute__((objc_designated_initializer));
182+
- (NSString *)component1 __attribute__((swift_name("component1()"))) __attribute__((deprecated("use corresponding property instead")));
183+
- (NSString *)component2 __attribute__((swift_name("component2()"))) __attribute__((deprecated("use corresponding property instead")));
184+
- (YChatChatMessage *)doCopyRole:(NSString *)role content:(NSString *)content __attribute__((swift_name("doCopy(role:content:)")));
185+
- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)")));
186+
- (NSUInteger)hash __attribute__((swift_name("hash()")));
187+
- (NSString *)description __attribute__((swift_name("description()")));
188+
@property (readonly) NSString *content __attribute__((swift_name("content")));
189+
@property (readonly) NSString *role __attribute__((swift_name("role")));
190+
@end
191+
175192
__attribute__((swift_name("KotlinThrowable")))
176193
@interface YChatKotlinThrowable : YChatBase
177194
- (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer));
@@ -209,6 +226,24 @@ __attribute__((swift_name("ChatGptException")))
209226
@property YChatInt * _Nullable statusCode __attribute__((swift_name("statusCode")));
210227
@end
211228

229+
__attribute__((swift_name("ChatCompletions")))
230+
@protocol YChatChatCompletions
231+
@required
232+
- (id<YChatChatCompletions>)addMessageRole:(NSString *)role content:(NSString *)content __attribute__((swift_name("addMessage(role:content:)")));
233+
234+
/**
235+
* @note This method converts instances of CancellationException, ChatGptException to errors.
236+
* Other uncaught Kotlin exceptions are fatal.
237+
*/
238+
- (void)executeContent:(NSString *)content completionHandler:(void (^)(NSArray<YChatChatMessage *> * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("execute(content:completionHandler:)")));
239+
- (void)executeContent:(NSString *)content callback:(id<YChatYChatCallback>)callback __attribute__((swift_name("execute(content:callback:)")));
240+
- (id<YChatChatCompletions>)setMaxResultsResults:(int32_t)results __attribute__((swift_name("setMaxResults(results:)")));
241+
- (id<YChatChatCompletions>)setMaxTokensTokens:(int32_t)tokens __attribute__((swift_name("setMaxTokens(tokens:)")));
242+
- (id<YChatChatCompletions>)setModelModel:(NSString *)model __attribute__((swift_name("setModel(model:)")));
243+
- (id<YChatChatCompletions>)setTemperatureTemperature:(double)temperature __attribute__((swift_name("setTemperature(temperature:)")));
244+
- (id<YChatChatCompletions>)setTopPTopP:(double)topP __attribute__((swift_name("setTopP(topP:)")));
245+
@end
246+
212247
__attribute__((swift_name("Completion")))
213248
@protocol YChatCompletion
214249
@required
@@ -227,6 +262,38 @@ __attribute__((swift_name("Completion")))
227262
- (id<YChatCompletion>)setTopPTopP:(double)topP __attribute__((swift_name("setTopP(topP:)")));
228263
@end
229264

265+
__attribute__((swift_name("Edits")))
266+
@protocol YChatEdits
267+
@required
268+
269+
/**
270+
* @note This method converts instances of CancellationException, ChatGptException to errors.
271+
* Other uncaught Kotlin exceptions are fatal.
272+
*/
273+
- (void)executeInstruction:(NSString *)instruction completionHandler:(void (^)(NSArray<NSString *> * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("execute(instruction:completionHandler:)")));
274+
- (void)executeInstruction:(NSString *)instruction callback:(id<YChatYChatCallback>)callback __attribute__((swift_name("execute(instruction:callback:)")));
275+
- (id<YChatEdits>)setInputInput:(NSString *)input __attribute__((swift_name("setInput(input:)")));
276+
- (id<YChatEdits>)setModelModel:(NSString *)model __attribute__((swift_name("setModel(model:)")));
277+
- (id<YChatEdits>)setResultsResults:(int32_t)results __attribute__((swift_name("setResults(results:)")));
278+
- (id<YChatEdits>)setTemperatureTemperature:(double)temperature __attribute__((swift_name("setTemperature(temperature:)")));
279+
- (id<YChatEdits>)setTopPTopP:(double)topP __attribute__((swift_name("setTopP(topP:)")));
280+
@end
281+
282+
__attribute__((swift_name("ImageGenerations")))
283+
@protocol YChatImageGenerations
284+
@required
285+
286+
/**
287+
* @note This method converts instances of CancellationException, ChatGptException to errors.
288+
* Other uncaught Kotlin exceptions are fatal.
289+
*/
290+
- (void)executePrompt:(NSString *)prompt completionHandler:(void (^)(NSArray<NSString *> * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("execute(prompt:completionHandler:)")));
291+
- (void)executePrompt:(NSString *)prompt callback:(id<YChatYChatCallback>)callback __attribute__((swift_name("execute(prompt:callback:)")));
292+
- (id<YChatImageGenerations>)setResponseFormatResponseFormat:(NSString *)responseFormat __attribute__((swift_name("setResponseFormat(responseFormat:)")));
293+
- (id<YChatImageGenerations>)setResultsResults:(int32_t)results __attribute__((swift_name("setResults(results:)")));
294+
- (id<YChatImageGenerations>)setSizeSize:(NSString *)size __attribute__((swift_name("setSize(size:)")));
295+
@end
296+
230297
__attribute__((objc_subclassing_restricted))
231298
__attribute__((swift_name("KotlinArray")))
232299
@interface YChatKotlinArray<T> : YChatBase
Binary file not shown.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>English</string>
7+
<key>CFBundleIdentifier</key>
8+
<string>com.apple.xcode.dsym.co.yml.ychat.YChat</string>
9+
<key>CFBundleInfoDictionaryVersion</key>
10+
<string>6.0</string>
11+
<key>CFBundlePackageType</key>
12+
<string>dSYM</string>
13+
<key>CFBundleSignature</key>
14+
<string>????</string>
15+
<key>CFBundleShortVersionString</key>
16+
<string>1.0</string>
17+
<key>CFBundleVersion</key>
18+
<string>1</string>
19+
</dict>
20+
</plist>

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ kotlin.mpp.enableCInteropCommonization=true
1111
# Lib
1212
GROUP=co.yml
1313
POM_ARTIFACT_ID=ychat
14-
VERSION_NAME=1.0.0
14+
VERSION_NAME=1.1.0
1515
IOS_NAME=YChat
1616

1717
# OSS

0 commit comments

Comments
 (0)