Skip to content

Commit

Permalink
chore: upgrade library version
Browse files Browse the repository at this point in the history
  • Loading branch information
osugikoji committed Mar 17, 2023
1 parent d3aeb53 commit 11651fe
Show file tree
Hide file tree
Showing 13 changed files with 184 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ repositories {
Then, simply import the dependency to your `build.gradle` dependencies:

```kotlin
implementation("co.yml:ychat:1.0.0")
implementation("co.yml:ychat:1.1.0")
```

Take a look at the Kotlin code snippet below for an example of how to initialize and use one of the supported features:
Expand Down
Binary file removed YChat-1.0.0.zip
Binary file not shown.
Binary file added YChat-1.1.0.zip
Binary file not shown.
4 changes: 4 additions & 0 deletions YChat.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<key>AvailableLibraries</key>
<array>
<dict>
<key>DebugSymbolsPath</key>
<string>dSYMs</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
Expand All @@ -17,6 +19,8 @@
<string>ios</string>
</dict>
<dict>
<key>DebugSymbolsPath</key>
<string>dSYMs</string>
<key>LibraryIdentifier</key>
<string>ios-x86_64-simulator</string>
<key>LibraryPath</key>
Expand Down
71 changes: 69 additions & 2 deletions YChat.xcframework/ios-arm64/YChat.framework/Headers/YChat.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#import <Foundation/NSString.h>
#import <Foundation/NSValue.h>

@class YChatKotlinThrowable, YChatYChatCompanion, YChatKotlinArray<T>, YChatKotlinException, YChatKotlinRuntimeException, YChatKotlinIllegalStateException;
@class YChatKotlinThrowable, YChatYChatCompanion, YChatChatMessage, YChatKotlinArray<T>, YChatKotlinException, YChatKotlinRuntimeException, YChatKotlinIllegalStateException;

@protocol YChatCompletion, YChatYChat, YChatYChatCallback, YChatKotlinIterator;
@protocol YChatChatCompletions, YChatCompletion, YChatEdits, YChatImageGenerations, YChatYChat, YChatYChatCallback, YChatKotlinIterator;

NS_ASSUME_NONNULL_BEGIN
#pragma clang diagnostic push
Expand Down Expand Up @@ -147,7 +147,10 @@ __attribute__((swift_name("KotlinBoolean")))
__attribute__((swift_name("YChat")))
@protocol YChatYChat
@required
- (id<YChatChatCompletions>)chatCompletions __attribute__((swift_name("chatCompletions()")));
- (id<YChatCompletion>)completion __attribute__((swift_name("completion()")));
- (id<YChatEdits>)edits __attribute__((swift_name("edits()")));
- (id<YChatImageGenerations>)imageGenerations __attribute__((swift_name("imageGenerations()")));
@end

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

__attribute__((objc_subclassing_restricted))
__attribute__((swift_name("ChatMessage")))
@interface YChatChatMessage : YChatBase
- (instancetype)initWithRole:(NSString *)role content:(NSString *)content __attribute__((swift_name("init(role:content:)"))) __attribute__((objc_designated_initializer));
- (NSString *)component1 __attribute__((swift_name("component1()"))) __attribute__((deprecated("use corresponding property instead")));
- (NSString *)component2 __attribute__((swift_name("component2()"))) __attribute__((deprecated("use corresponding property instead")));
- (YChatChatMessage *)doCopyRole:(NSString *)role content:(NSString *)content __attribute__((swift_name("doCopy(role:content:)")));
- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)")));
- (NSUInteger)hash __attribute__((swift_name("hash()")));
- (NSString *)description __attribute__((swift_name("description()")));
@property (readonly) NSString *content __attribute__((swift_name("content")));
@property (readonly) NSString *role __attribute__((swift_name("role")));
@end

__attribute__((swift_name("KotlinThrowable")))
@interface YChatKotlinThrowable : YChatBase
- (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer));
Expand Down Expand Up @@ -209,6 +226,24 @@ __attribute__((swift_name("ChatGptException")))
@property YChatInt * _Nullable statusCode __attribute__((swift_name("statusCode")));
@end

__attribute__((swift_name("ChatCompletions")))
@protocol YChatChatCompletions
@required
- (id<YChatChatCompletions>)addMessageRole:(NSString *)role content:(NSString *)content __attribute__((swift_name("addMessage(role:content:)")));

/**
* @note This method converts instances of CancellationException, ChatGptException to errors.
* Other uncaught Kotlin exceptions are fatal.
*/
- (void)executeContent:(NSString *)content completionHandler:(void (^)(NSArray<YChatChatMessage *> * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("execute(content:completionHandler:)")));
- (void)executeContent:(NSString *)content callback:(id<YChatYChatCallback>)callback __attribute__((swift_name("execute(content:callback:)")));
- (id<YChatChatCompletions>)setMaxResultsResults:(int32_t)results __attribute__((swift_name("setMaxResults(results:)")));
- (id<YChatChatCompletions>)setMaxTokensTokens:(int32_t)tokens __attribute__((swift_name("setMaxTokens(tokens:)")));
- (id<YChatChatCompletions>)setModelModel:(NSString *)model __attribute__((swift_name("setModel(model:)")));
- (id<YChatChatCompletions>)setTemperatureTemperature:(double)temperature __attribute__((swift_name("setTemperature(temperature:)")));
- (id<YChatChatCompletions>)setTopPTopP:(double)topP __attribute__((swift_name("setTopP(topP:)")));
@end

__attribute__((swift_name("Completion")))
@protocol YChatCompletion
@required
Expand All @@ -227,6 +262,38 @@ __attribute__((swift_name("Completion")))
- (id<YChatCompletion>)setTopPTopP:(double)topP __attribute__((swift_name("setTopP(topP:)")));
@end

__attribute__((swift_name("Edits")))
@protocol YChatEdits
@required

/**
* @note This method converts instances of CancellationException, ChatGptException to errors.
* Other uncaught Kotlin exceptions are fatal.
*/
- (void)executeInstruction:(NSString *)instruction completionHandler:(void (^)(NSArray<NSString *> * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("execute(instruction:completionHandler:)")));
- (void)executeInstruction:(NSString *)instruction callback:(id<YChatYChatCallback>)callback __attribute__((swift_name("execute(instruction:callback:)")));
- (id<YChatEdits>)setInputInput:(NSString *)input __attribute__((swift_name("setInput(input:)")));
- (id<YChatEdits>)setModelModel:(NSString *)model __attribute__((swift_name("setModel(model:)")));
- (id<YChatEdits>)setResultsResults:(int32_t)results __attribute__((swift_name("setResults(results:)")));
- (id<YChatEdits>)setTemperatureTemperature:(double)temperature __attribute__((swift_name("setTemperature(temperature:)")));
- (id<YChatEdits>)setTopPTopP:(double)topP __attribute__((swift_name("setTopP(topP:)")));
@end

__attribute__((swift_name("ImageGenerations")))
@protocol YChatImageGenerations
@required

/**
* @note This method converts instances of CancellationException, ChatGptException to errors.
* Other uncaught Kotlin exceptions are fatal.
*/
- (void)executePrompt:(NSString *)prompt completionHandler:(void (^)(NSArray<NSString *> * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("execute(prompt:completionHandler:)")));
- (void)executePrompt:(NSString *)prompt callback:(id<YChatYChatCallback>)callback __attribute__((swift_name("execute(prompt:callback:)")));
- (id<YChatImageGenerations>)setResponseFormatResponseFormat:(NSString *)responseFormat __attribute__((swift_name("setResponseFormat(responseFormat:)")));
- (id<YChatImageGenerations>)setResultsResults:(int32_t)results __attribute__((swift_name("setResults(results:)")));
- (id<YChatImageGenerations>)setSizeSize:(NSString *)size __attribute__((swift_name("setSize(size:)")));
@end

__attribute__((objc_subclassing_restricted))
__attribute__((swift_name("KotlinArray")))
@interface YChatKotlinArray<T> : YChatBase
Expand Down
Binary file modified YChat.xcframework/ios-arm64/YChat.framework/YChat
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.co.yml.ychat.YChat</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#import <Foundation/NSString.h>
#import <Foundation/NSValue.h>

@class YChatKotlinThrowable, YChatYChatCompanion, YChatKotlinArray<T>, YChatKotlinException, YChatKotlinRuntimeException, YChatKotlinIllegalStateException;
@class YChatKotlinThrowable, YChatYChatCompanion, YChatChatMessage, YChatKotlinArray<T>, YChatKotlinException, YChatKotlinRuntimeException, YChatKotlinIllegalStateException;

@protocol YChatCompletion, YChatYChat, YChatYChatCallback, YChatKotlinIterator;
@protocol YChatChatCompletions, YChatCompletion, YChatEdits, YChatImageGenerations, YChatYChat, YChatYChatCallback, YChatKotlinIterator;

NS_ASSUME_NONNULL_BEGIN
#pragma clang diagnostic push
Expand Down Expand Up @@ -147,7 +147,10 @@ __attribute__((swift_name("KotlinBoolean")))
__attribute__((swift_name("YChat")))
@protocol YChatYChat
@required
- (id<YChatChatCompletions>)chatCompletions __attribute__((swift_name("chatCompletions()")));
- (id<YChatCompletion>)completion __attribute__((swift_name("completion()")));
- (id<YChatEdits>)edits __attribute__((swift_name("edits()")));
- (id<YChatImageGenerations>)imageGenerations __attribute__((swift_name("imageGenerations()")));
@end

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

__attribute__((objc_subclassing_restricted))
__attribute__((swift_name("ChatMessage")))
@interface YChatChatMessage : YChatBase
- (instancetype)initWithRole:(NSString *)role content:(NSString *)content __attribute__((swift_name("init(role:content:)"))) __attribute__((objc_designated_initializer));
- (NSString *)component1 __attribute__((swift_name("component1()"))) __attribute__((deprecated("use corresponding property instead")));
- (NSString *)component2 __attribute__((swift_name("component2()"))) __attribute__((deprecated("use corresponding property instead")));
- (YChatChatMessage *)doCopyRole:(NSString *)role content:(NSString *)content __attribute__((swift_name("doCopy(role:content:)")));
- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)")));
- (NSUInteger)hash __attribute__((swift_name("hash()")));
- (NSString *)description __attribute__((swift_name("description()")));
@property (readonly) NSString *content __attribute__((swift_name("content")));
@property (readonly) NSString *role __attribute__((swift_name("role")));
@end

__attribute__((swift_name("KotlinThrowable")))
@interface YChatKotlinThrowable : YChatBase
- (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer));
Expand Down Expand Up @@ -209,6 +226,24 @@ __attribute__((swift_name("ChatGptException")))
@property YChatInt * _Nullable statusCode __attribute__((swift_name("statusCode")));
@end

__attribute__((swift_name("ChatCompletions")))
@protocol YChatChatCompletions
@required
- (id<YChatChatCompletions>)addMessageRole:(NSString *)role content:(NSString *)content __attribute__((swift_name("addMessage(role:content:)")));

/**
* @note This method converts instances of CancellationException, ChatGptException to errors.
* Other uncaught Kotlin exceptions are fatal.
*/
- (void)executeContent:(NSString *)content completionHandler:(void (^)(NSArray<YChatChatMessage *> * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("execute(content:completionHandler:)")));
- (void)executeContent:(NSString *)content callback:(id<YChatYChatCallback>)callback __attribute__((swift_name("execute(content:callback:)")));
- (id<YChatChatCompletions>)setMaxResultsResults:(int32_t)results __attribute__((swift_name("setMaxResults(results:)")));
- (id<YChatChatCompletions>)setMaxTokensTokens:(int32_t)tokens __attribute__((swift_name("setMaxTokens(tokens:)")));
- (id<YChatChatCompletions>)setModelModel:(NSString *)model __attribute__((swift_name("setModel(model:)")));
- (id<YChatChatCompletions>)setTemperatureTemperature:(double)temperature __attribute__((swift_name("setTemperature(temperature:)")));
- (id<YChatChatCompletions>)setTopPTopP:(double)topP __attribute__((swift_name("setTopP(topP:)")));
@end

__attribute__((swift_name("Completion")))
@protocol YChatCompletion
@required
Expand All @@ -227,6 +262,38 @@ __attribute__((swift_name("Completion")))
- (id<YChatCompletion>)setTopPTopP:(double)topP __attribute__((swift_name("setTopP(topP:)")));
@end

__attribute__((swift_name("Edits")))
@protocol YChatEdits
@required

/**
* @note This method converts instances of CancellationException, ChatGptException to errors.
* Other uncaught Kotlin exceptions are fatal.
*/
- (void)executeInstruction:(NSString *)instruction completionHandler:(void (^)(NSArray<NSString *> * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("execute(instruction:completionHandler:)")));
- (void)executeInstruction:(NSString *)instruction callback:(id<YChatYChatCallback>)callback __attribute__((swift_name("execute(instruction:callback:)")));
- (id<YChatEdits>)setInputInput:(NSString *)input __attribute__((swift_name("setInput(input:)")));
- (id<YChatEdits>)setModelModel:(NSString *)model __attribute__((swift_name("setModel(model:)")));
- (id<YChatEdits>)setResultsResults:(int32_t)results __attribute__((swift_name("setResults(results:)")));
- (id<YChatEdits>)setTemperatureTemperature:(double)temperature __attribute__((swift_name("setTemperature(temperature:)")));
- (id<YChatEdits>)setTopPTopP:(double)topP __attribute__((swift_name("setTopP(topP:)")));
@end

__attribute__((swift_name("ImageGenerations")))
@protocol YChatImageGenerations
@required

/**
* @note This method converts instances of CancellationException, ChatGptException to errors.
* Other uncaught Kotlin exceptions are fatal.
*/
- (void)executePrompt:(NSString *)prompt completionHandler:(void (^)(NSArray<NSString *> * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("execute(prompt:completionHandler:)")));
- (void)executePrompt:(NSString *)prompt callback:(id<YChatYChatCallback>)callback __attribute__((swift_name("execute(prompt:callback:)")));
- (id<YChatImageGenerations>)setResponseFormatResponseFormat:(NSString *)responseFormat __attribute__((swift_name("setResponseFormat(responseFormat:)")));
- (id<YChatImageGenerations>)setResultsResults:(int32_t)results __attribute__((swift_name("setResults(results:)")));
- (id<YChatImageGenerations>)setSizeSize:(NSString *)size __attribute__((swift_name("setSize(size:)")));
@end

__attribute__((objc_subclassing_restricted))
__attribute__((swift_name("KotlinArray")))
@interface YChatKotlinArray<T> : YChatBase
Expand Down
Binary file modified YChat.xcframework/ios-x86_64-simulator/YChat.framework/YChat
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.co.yml.ychat.YChat</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ kotlin.mpp.enableCInteropCommonization=true
# Lib
GROUP=co.yml
POM_ARTIFACT_ID=ychat
VERSION_NAME=1.0.0
VERSION_NAME=1.1.0
IOS_NAME=YChat

# OSS
Expand Down

0 comments on commit 11651fe

Please sign in to comment.