Skip to content

Commit 0252796

Browse files
authored
Merge pull request #63 from yml-org/releases/1.3.0
chore: increment version and update swift package
2 parents f1ebfa9 + 993f383 commit 0252796

File tree

13 files changed

+174
-6
lines changed

13 files changed

+174
-6
lines changed

README.md

+1-1
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.2.0")
62+
implementation("co.yml:ychat:1.3.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.2.0.zip

-8.72 MB
Binary file not shown.

YChat-1.3.0.zip

11.2 MB
Binary file not shown.

YChat.xcframework/Info.plist

+4
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-x86_64-simulator</string>
1012
<key>LibraryPath</key>
@@ -19,6 +21,8 @@
1921
<string>simulator</string>
2022
</dict>
2123
<dict>
24+
<key>DebugSymbolsPath</key>
25+
<string>dSYMs</string>
2226
<key>LibraryIdentifier</key>
2327
<string>ios-arm64</string>
2428
<key>LibraryPath</key>

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

+64-2
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, YChatAIModelPermission, YChatAIModel, YChatChatMessage, YChatKotlinArray<T>, YChatKotlinException, YChatKotlinRuntimeException, YChatKotlinIllegalStateException;
9+
@class YChatKotlinThrowable, YChatYChatCompanion, YChatAIModelPermission, YChatAIModel, YChatChatMessage, YChatKotlinArray<T>, YChatKotlinException, NSData, YChatKotlinByteArray, YChatKotlinRuntimeException, YChatKotlinIllegalStateException, YChatKotlinByteIterator;
1010

11-
@protocol YChatChatCompletions, YChatCompletion, YChatEdits, YChatImageGenerations, YChatListModels, YChatRetrieveModel, YChatYChat, YChatYChatCallback, YChatKotlinIterator;
11+
@protocol YChatAudioTranscriptions, YChatAudioTranslations, YChatChatCompletions, YChatCompletion, YChatEdits, YChatImageGenerations, YChatListModels, YChatRetrieveModel, YChatYChat, YChatYChatCallback, YChatKotlinIterator;
1212

1313
NS_ASSUME_NONNULL_BEGIN
1414
#pragma clang diagnostic push
@@ -147,6 +147,8 @@ __attribute__((swift_name("KotlinBoolean")))
147147
__attribute__((swift_name("YChat")))
148148
@protocol YChatYChat
149149
@required
150+
- (id<YChatAudioTranscriptions>)audioTranscriptions __attribute__((swift_name("audioTranscriptions()")));
151+
- (id<YChatAudioTranslations>)audioTranslations __attribute__((swift_name("audioTranslations()")));
150152
- (id<YChatChatCompletions>)chatCompletions __attribute__((swift_name("chatCompletions()")));
151153
- (id<YChatCompletion>)completion __attribute__((swift_name("completion()")));
152154
- (id<YChatEdits>)edits __attribute__((swift_name("edits()")));
@@ -272,6 +274,39 @@ __attribute__((swift_name("ChatGptException")))
272274
@property YChatInt * _Nullable statusCode __attribute__((swift_name("statusCode")));
273275
@end
274276

277+
__attribute__((swift_name("AudioTranscriptions")))
278+
@protocol YChatAudioTranscriptions
279+
@required
280+
281+
/**
282+
* @note This method converts instances of CancellationException, ChatGptException to errors.
283+
* Other uncaught Kotlin exceptions are fatal.
284+
*/
285+
- (void)executeFilename:(NSString *)filename audioFile:(NSData *)audioFile completionHandler:(void (^)(NSString * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("execute(filename:audioFile:completionHandler:)")));
286+
- (void)executeFilename:(NSString *)filename audioFile:(NSData *)audioFile callback:(id<YChatYChatCallback>)callback __attribute__((swift_name("execute(filename:audioFile:callback:)")));
287+
- (id<YChatAudioTranscriptions>)setLanguageLanguage:(NSString *)language __attribute__((swift_name("setLanguage(language:)")));
288+
- (id<YChatAudioTranscriptions>)setModelModel:(NSString *)model __attribute__((swift_name("setModel(model:)")));
289+
- (id<YChatAudioTranscriptions>)setPromptPrompt:(NSString *)prompt __attribute__((swift_name("setPrompt(prompt:)")));
290+
- (id<YChatAudioTranscriptions>)setResponseFormatFormat:(NSString *)format __attribute__((swift_name("setResponseFormat(format:)")));
291+
- (id<YChatAudioTranscriptions>)setTemperatureTemperature:(double)temperature __attribute__((swift_name("setTemperature(temperature:)")));
292+
@end
293+
294+
__attribute__((swift_name("AudioTranslations")))
295+
@protocol YChatAudioTranslations
296+
@required
297+
298+
/**
299+
* @note This method converts instances of CancellationException, ChatGptException to errors.
300+
* Other uncaught Kotlin exceptions are fatal.
301+
*/
302+
- (void)executeFilename:(NSString *)filename audioFile:(NSData *)audioFile completionHandler:(void (^)(NSString * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("execute(filename:audioFile:completionHandler:)")));
303+
- (void)executeFilename:(NSString *)filename audioFile:(NSData *)audioFile callback:(id<YChatYChatCallback>)callback __attribute__((swift_name("execute(filename:audioFile:callback:)")));
304+
- (id<YChatAudioTranslations>)setModelModel:(NSString *)model __attribute__((swift_name("setModel(model:)")));
305+
- (id<YChatAudioTranslations>)setPromptPrompt:(NSString *)prompt __attribute__((swift_name("setPrompt(prompt:)")));
306+
- (id<YChatAudioTranslations>)setResponseFormatFormat:(NSString *)format __attribute__((swift_name("setResponseFormat(format:)")));
307+
- (id<YChatAudioTranslations>)setTemperatureTemperature:(double)temperature __attribute__((swift_name("setTemperature(temperature:)")));
308+
@end
309+
275310
__attribute__((swift_name("ChatCompletions")))
276311
@protocol YChatChatCompletions
277312
@required
@@ -364,6 +399,12 @@ __attribute__((swift_name("RetrieveModel")))
364399
- (void)executeId:(NSString *)id callback:(id<YChatYChatCallback>)callback __attribute__((swift_name("execute(id:callback:)")));
365400
@end
366401

402+
__attribute__((objc_subclassing_restricted))
403+
__attribute__((swift_name("FileBytesKt")))
404+
@interface YChatFileBytesKt : YChatBase
405+
+ (YChatKotlinByteArray *)toByteArray:(NSData *)receiver __attribute__((swift_name("toByteArray(_:)")));
406+
@end
407+
367408
__attribute__((objc_subclassing_restricted))
368409
__attribute__((swift_name("KotlinArray")))
369410
@interface YChatKotlinArray<T> : YChatBase
@@ -408,13 +449,34 @@ __attribute__((swift_name("KotlinCancellationException")))
408449
- (instancetype)initWithCause:(YChatKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer));
409450
@end
410451

452+
__attribute__((objc_subclassing_restricted))
453+
__attribute__((swift_name("KotlinByteArray")))
454+
@interface YChatKotlinByteArray : YChatBase
455+
+ (instancetype)arrayWithSize:(int32_t)size __attribute__((swift_name("init(size:)")));
456+
+ (instancetype)arrayWithSize:(int32_t)size init:(YChatByte *(^)(YChatInt *))init __attribute__((swift_name("init(size:init:)")));
457+
+ (instancetype)alloc __attribute__((unavailable));
458+
+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable));
459+
- (int8_t)getIndex:(int32_t)index __attribute__((swift_name("get(index:)")));
460+
- (YChatKotlinByteIterator *)iterator __attribute__((swift_name("iterator()")));
461+
- (void)setIndex:(int32_t)index value:(int8_t)value __attribute__((swift_name("set(index:value:)")));
462+
@property (readonly) int32_t size __attribute__((swift_name("size")));
463+
@end
464+
411465
__attribute__((swift_name("KotlinIterator")))
412466
@protocol YChatKotlinIterator
413467
@required
414468
- (BOOL)hasNext __attribute__((swift_name("hasNext()")));
415469
- (id _Nullable)next __attribute__((swift_name("next()")));
416470
@end
417471

472+
__attribute__((swift_name("KotlinByteIterator")))
473+
@interface YChatKotlinByteIterator : YChatBase <YChatKotlinIterator>
474+
- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer));
475+
+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead")));
476+
- (YChatByte *)next __attribute__((swift_name("next()")));
477+
- (int8_t)nextByte __attribute__((swift_name("nextByte()")));
478+
@end
479+
418480
#pragma pop_macro("_Nullable_result")
419481
#pragma clang diagnostic pop
420482
NS_ASSUME_NONNULL_END
Binary file not shown.
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

+64-2
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, YChatAIModelPermission, YChatAIModel, YChatChatMessage, YChatKotlinArray<T>, YChatKotlinException, YChatKotlinRuntimeException, YChatKotlinIllegalStateException;
9+
@class YChatKotlinThrowable, YChatYChatCompanion, YChatAIModelPermission, YChatAIModel, YChatChatMessage, YChatKotlinArray<T>, YChatKotlinException, NSData, YChatKotlinByteArray, YChatKotlinRuntimeException, YChatKotlinIllegalStateException, YChatKotlinByteIterator;
1010

11-
@protocol YChatChatCompletions, YChatCompletion, YChatEdits, YChatImageGenerations, YChatListModels, YChatRetrieveModel, YChatYChat, YChatYChatCallback, YChatKotlinIterator;
11+
@protocol YChatAudioTranscriptions, YChatAudioTranslations, YChatChatCompletions, YChatCompletion, YChatEdits, YChatImageGenerations, YChatListModels, YChatRetrieveModel, YChatYChat, YChatYChatCallback, YChatKotlinIterator;
1212

1313
NS_ASSUME_NONNULL_BEGIN
1414
#pragma clang diagnostic push
@@ -147,6 +147,8 @@ __attribute__((swift_name("KotlinBoolean")))
147147
__attribute__((swift_name("YChat")))
148148
@protocol YChatYChat
149149
@required
150+
- (id<YChatAudioTranscriptions>)audioTranscriptions __attribute__((swift_name("audioTranscriptions()")));
151+
- (id<YChatAudioTranslations>)audioTranslations __attribute__((swift_name("audioTranslations()")));
150152
- (id<YChatChatCompletions>)chatCompletions __attribute__((swift_name("chatCompletions()")));
151153
- (id<YChatCompletion>)completion __attribute__((swift_name("completion()")));
152154
- (id<YChatEdits>)edits __attribute__((swift_name("edits()")));
@@ -272,6 +274,39 @@ __attribute__((swift_name("ChatGptException")))
272274
@property YChatInt * _Nullable statusCode __attribute__((swift_name("statusCode")));
273275
@end
274276

277+
__attribute__((swift_name("AudioTranscriptions")))
278+
@protocol YChatAudioTranscriptions
279+
@required
280+
281+
/**
282+
* @note This method converts instances of CancellationException, ChatGptException to errors.
283+
* Other uncaught Kotlin exceptions are fatal.
284+
*/
285+
- (void)executeFilename:(NSString *)filename audioFile:(NSData *)audioFile completionHandler:(void (^)(NSString * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("execute(filename:audioFile:completionHandler:)")));
286+
- (void)executeFilename:(NSString *)filename audioFile:(NSData *)audioFile callback:(id<YChatYChatCallback>)callback __attribute__((swift_name("execute(filename:audioFile:callback:)")));
287+
- (id<YChatAudioTranscriptions>)setLanguageLanguage:(NSString *)language __attribute__((swift_name("setLanguage(language:)")));
288+
- (id<YChatAudioTranscriptions>)setModelModel:(NSString *)model __attribute__((swift_name("setModel(model:)")));
289+
- (id<YChatAudioTranscriptions>)setPromptPrompt:(NSString *)prompt __attribute__((swift_name("setPrompt(prompt:)")));
290+
- (id<YChatAudioTranscriptions>)setResponseFormatFormat:(NSString *)format __attribute__((swift_name("setResponseFormat(format:)")));
291+
- (id<YChatAudioTranscriptions>)setTemperatureTemperature:(double)temperature __attribute__((swift_name("setTemperature(temperature:)")));
292+
@end
293+
294+
__attribute__((swift_name("AudioTranslations")))
295+
@protocol YChatAudioTranslations
296+
@required
297+
298+
/**
299+
* @note This method converts instances of CancellationException, ChatGptException to errors.
300+
* Other uncaught Kotlin exceptions are fatal.
301+
*/
302+
- (void)executeFilename:(NSString *)filename audioFile:(NSData *)audioFile completionHandler:(void (^)(NSString * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("execute(filename:audioFile:completionHandler:)")));
303+
- (void)executeFilename:(NSString *)filename audioFile:(NSData *)audioFile callback:(id<YChatYChatCallback>)callback __attribute__((swift_name("execute(filename:audioFile:callback:)")));
304+
- (id<YChatAudioTranslations>)setModelModel:(NSString *)model __attribute__((swift_name("setModel(model:)")));
305+
- (id<YChatAudioTranslations>)setPromptPrompt:(NSString *)prompt __attribute__((swift_name("setPrompt(prompt:)")));
306+
- (id<YChatAudioTranslations>)setResponseFormatFormat:(NSString *)format __attribute__((swift_name("setResponseFormat(format:)")));
307+
- (id<YChatAudioTranslations>)setTemperatureTemperature:(double)temperature __attribute__((swift_name("setTemperature(temperature:)")));
308+
@end
309+
275310
__attribute__((swift_name("ChatCompletions")))
276311
@protocol YChatChatCompletions
277312
@required
@@ -364,6 +399,12 @@ __attribute__((swift_name("RetrieveModel")))
364399
- (void)executeId:(NSString *)id callback:(id<YChatYChatCallback>)callback __attribute__((swift_name("execute(id:callback:)")));
365400
@end
366401

402+
__attribute__((objc_subclassing_restricted))
403+
__attribute__((swift_name("FileBytesKt")))
404+
@interface YChatFileBytesKt : YChatBase
405+
+ (YChatKotlinByteArray *)toByteArray:(NSData *)receiver __attribute__((swift_name("toByteArray(_:)")));
406+
@end
407+
367408
__attribute__((objc_subclassing_restricted))
368409
__attribute__((swift_name("KotlinArray")))
369410
@interface YChatKotlinArray<T> : YChatBase
@@ -408,13 +449,34 @@ __attribute__((swift_name("KotlinCancellationException")))
408449
- (instancetype)initWithCause:(YChatKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer));
409450
@end
410451

452+
__attribute__((objc_subclassing_restricted))
453+
__attribute__((swift_name("KotlinByteArray")))
454+
@interface YChatKotlinByteArray : YChatBase
455+
+ (instancetype)arrayWithSize:(int32_t)size __attribute__((swift_name("init(size:)")));
456+
+ (instancetype)arrayWithSize:(int32_t)size init:(YChatByte *(^)(YChatInt *))init __attribute__((swift_name("init(size:init:)")));
457+
+ (instancetype)alloc __attribute__((unavailable));
458+
+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable));
459+
- (int8_t)getIndex:(int32_t)index __attribute__((swift_name("get(index:)")));
460+
- (YChatKotlinByteIterator *)iterator __attribute__((swift_name("iterator()")));
461+
- (void)setIndex:(int32_t)index value:(int8_t)value __attribute__((swift_name("set(index:value:)")));
462+
@property (readonly) int32_t size __attribute__((swift_name("size")));
463+
@end
464+
411465
__attribute__((swift_name("KotlinIterator")))
412466
@protocol YChatKotlinIterator
413467
@required
414468
- (BOOL)hasNext __attribute__((swift_name("hasNext()")));
415469
- (id _Nullable)next __attribute__((swift_name("next()")));
416470
@end
417471

472+
__attribute__((swift_name("KotlinByteIterator")))
473+
@interface YChatKotlinByteIterator : YChatBase <YChatKotlinIterator>
474+
- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer));
475+
+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead")));
476+
- (YChatByte *)next __attribute__((swift_name("next()")));
477+
- (int8_t)nextByte __attribute__((swift_name("nextByte()")));
478+
@end
479+
418480
#pragma pop_macro("_Nullable_result")
419481
#pragma clang diagnostic pop
420482
NS_ASSUME_NONNULL_END
Binary file not shown.
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

+1-1
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.2.0
14+
VERSION_NAME=1.3.0
1515
IOS_NAME=YChat
1616

1717
# OSS

0 commit comments

Comments
 (0)