Skip to content

Commit

Permalink
Merge pull request #58 from yml-org/releases/1.2.0
Browse files Browse the repository at this point in the history
chore: Increment version and update swift package
  • Loading branch information
osugikoji authored Apr 1, 2023
2 parents 571dddd + a78c4e6 commit 79faba6
Show file tree
Hide file tree
Showing 7 changed files with 146 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.1.1")
implementation("co.yml:ychat:1.2.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 renamed YChat-1.1.1.zip → YChat-1.2.0.zip
Binary file not shown.
74 changes: 72 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, YChatChatMessage, YChatKotlinArray<T>, YChatKotlinException, YChatKotlinRuntimeException, YChatKotlinIllegalStateException;
@class YChatKotlinThrowable, YChatYChatCompanion, YChatAIModelPermission, YChatAIModel, YChatChatMessage, YChatKotlinArray<T>, YChatKotlinException, YChatKotlinRuntimeException, YChatKotlinIllegalStateException;

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

NS_ASSUME_NONNULL_BEGIN
#pragma clang diagnostic push
Expand Down Expand Up @@ -151,6 +151,8 @@ __attribute__((swift_name("YChat")))
- (id<YChatCompletion>)completion __attribute__((swift_name("completion()")));
- (id<YChatEdits>)edits __attribute__((swift_name("edits()")));
- (id<YChatImageGenerations>)imageGenerations __attribute__((swift_name("imageGenerations()")));
- (id<YChatListModels>)listModels __attribute__((swift_name("listModels()")));
- (id<YChatRetrieveModel>)retrieveModel __attribute__((swift_name("retrieveModel()")));
@end

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

__attribute__((objc_subclassing_restricted))
__attribute__((swift_name("AIModel")))
@interface YChatAIModel : YChatBase
- (instancetype)initWithId:(NSString *)id ownedBy:(NSString *)ownedBy permission:(NSArray<YChatAIModelPermission *> *)permission __attribute__((swift_name("init(id:ownedBy:permission:)"))) __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")));
- (NSArray<YChatAIModelPermission *> *)component3 __attribute__((swift_name("component3()"))) __attribute__((deprecated("use corresponding property instead")));
- (YChatAIModel *)doCopyId:(NSString *)id ownedBy:(NSString *)ownedBy permission:(NSArray<YChatAIModelPermission *> *)permission __attribute__((swift_name("doCopy(id:ownedBy:permission:)")));
- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)")));
- (NSUInteger)hash __attribute__((swift_name("hash()")));
- (NSString *)description __attribute__((swift_name("description()")));
@property (readonly) NSString *id __attribute__((swift_name("id")));
@property (readonly) NSString *ownedBy __attribute__((swift_name("ownedBy")));
@property (readonly) NSArray<YChatAIModelPermission *> *permission __attribute__((swift_name("permission")));
@end

__attribute__((objc_subclassing_restricted))
__attribute__((swift_name("AIModelPermission")))
@interface YChatAIModelPermission : YChatBase
- (instancetype)initWithId:(NSString *)id allowCreateEngine:(BOOL)allowCreateEngine allowSampling:(BOOL)allowSampling allowLogProbs:(BOOL)allowLogProbs allowSearchIndices:(BOOL)allowSearchIndices allowView:(BOOL)allowView allowFineTuning:(BOOL)allowFineTuning organization:(NSString *)organization isBlocking:(BOOL)isBlocking __attribute__((swift_name("init(id:allowCreateEngine:allowSampling:allowLogProbs:allowSearchIndices:allowView:allowFineTuning:organization:isBlocking:)"))) __attribute__((objc_designated_initializer));
- (NSString *)component1 __attribute__((swift_name("component1()"))) __attribute__((deprecated("use corresponding property instead")));
- (BOOL)component2 __attribute__((swift_name("component2()"))) __attribute__((deprecated("use corresponding property instead")));
- (BOOL)component3 __attribute__((swift_name("component3()"))) __attribute__((deprecated("use corresponding property instead")));
- (BOOL)component4 __attribute__((swift_name("component4()"))) __attribute__((deprecated("use corresponding property instead")));
- (BOOL)component5 __attribute__((swift_name("component5()"))) __attribute__((deprecated("use corresponding property instead")));
- (BOOL)component6 __attribute__((swift_name("component6()"))) __attribute__((deprecated("use corresponding property instead")));
- (BOOL)component7 __attribute__((swift_name("component7()"))) __attribute__((deprecated("use corresponding property instead")));
- (NSString *)component8 __attribute__((swift_name("component8()"))) __attribute__((deprecated("use corresponding property instead")));
- (BOOL)component9 __attribute__((swift_name("component9()"))) __attribute__((deprecated("use corresponding property instead")));
- (YChatAIModelPermission *)doCopyId:(NSString *)id allowCreateEngine:(BOOL)allowCreateEngine allowSampling:(BOOL)allowSampling allowLogProbs:(BOOL)allowLogProbs allowSearchIndices:(BOOL)allowSearchIndices allowView:(BOOL)allowView allowFineTuning:(BOOL)allowFineTuning organization:(NSString *)organization isBlocking:(BOOL)isBlocking __attribute__((swift_name("doCopy(id:allowCreateEngine:allowSampling:allowLogProbs:allowSearchIndices:allowView:allowFineTuning:organization:isBlocking:)")));
- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)")));
- (NSUInteger)hash __attribute__((swift_name("hash()")));
- (NSString *)description __attribute__((swift_name("description()")));
@property (readonly) BOOL allowCreateEngine __attribute__((swift_name("allowCreateEngine")));
@property (readonly) BOOL allowFineTuning __attribute__((swift_name("allowFineTuning")));
@property (readonly) BOOL allowLogProbs __attribute__((swift_name("allowLogProbs")));
@property (readonly) BOOL allowSampling __attribute__((swift_name("allowSampling")));
@property (readonly) BOOL allowSearchIndices __attribute__((swift_name("allowSearchIndices")));
@property (readonly) BOOL allowView __attribute__((swift_name("allowView")));
@property (readonly) NSString *id __attribute__((swift_name("id")));
@property (readonly) BOOL isBlocking __attribute__((swift_name("isBlocking")));
@property (readonly) NSString *organization __attribute__((swift_name("organization")));
@end

__attribute__((objc_subclassing_restricted))
__attribute__((swift_name("ChatMessage")))
@interface YChatChatMessage : YChatBase
Expand Down Expand Up @@ -294,6 +340,30 @@ __attribute__((swift_name("ImageGenerations")))
- (id<YChatImageGenerations>)setSizeSize:(NSString *)size __attribute__((swift_name("setSize(size:)")));
@end

__attribute__((swift_name("ListModels")))
@protocol YChatListModels
@required

/**
* @note This method converts instances of CancellationException, ChatGptException to errors.
* Other uncaught Kotlin exceptions are fatal.
*/
- (void)executeWithCompletionHandler:(void (^)(NSArray<YChatAIModel *> * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("execute(completionHandler:)")));
- (void)executeCallback_:(id<YChatYChatCallback>)callback __attribute__((swift_name("execute(callback_:)")));
@end

__attribute__((swift_name("RetrieveModel")))
@protocol YChatRetrieveModel
@required

/**
* @note This method converts instances of CancellationException, ChatGptException to errors.
* Other uncaught Kotlin exceptions are fatal.
*/
- (void)executeId:(NSString *)id completionHandler:(void (^)(YChatAIModel * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("execute(id:completionHandler:)")));
- (void)executeId:(NSString *)id callback:(id<YChatYChatCallback>)callback __attribute__((swift_name("execute(id:callback:)")));
@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
Expand Up @@ -6,9 +6,9 @@
#import <Foundation/NSString.h>
#import <Foundation/NSValue.h>

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

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

NS_ASSUME_NONNULL_BEGIN
#pragma clang diagnostic push
Expand Down Expand Up @@ -151,6 +151,8 @@ __attribute__((swift_name("YChat")))
- (id<YChatCompletion>)completion __attribute__((swift_name("completion()")));
- (id<YChatEdits>)edits __attribute__((swift_name("edits()")));
- (id<YChatImageGenerations>)imageGenerations __attribute__((swift_name("imageGenerations()")));
- (id<YChatListModels>)listModels __attribute__((swift_name("listModels()")));
- (id<YChatRetrieveModel>)retrieveModel __attribute__((swift_name("retrieveModel()")));
@end

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

__attribute__((objc_subclassing_restricted))
__attribute__((swift_name("AIModel")))
@interface YChatAIModel : YChatBase
- (instancetype)initWithId:(NSString *)id ownedBy:(NSString *)ownedBy permission:(NSArray<YChatAIModelPermission *> *)permission __attribute__((swift_name("init(id:ownedBy:permission:)"))) __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")));
- (NSArray<YChatAIModelPermission *> *)component3 __attribute__((swift_name("component3()"))) __attribute__((deprecated("use corresponding property instead")));
- (YChatAIModel *)doCopyId:(NSString *)id ownedBy:(NSString *)ownedBy permission:(NSArray<YChatAIModelPermission *> *)permission __attribute__((swift_name("doCopy(id:ownedBy:permission:)")));
- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)")));
- (NSUInteger)hash __attribute__((swift_name("hash()")));
- (NSString *)description __attribute__((swift_name("description()")));
@property (readonly) NSString *id __attribute__((swift_name("id")));
@property (readonly) NSString *ownedBy __attribute__((swift_name("ownedBy")));
@property (readonly) NSArray<YChatAIModelPermission *> *permission __attribute__((swift_name("permission")));
@end

__attribute__((objc_subclassing_restricted))
__attribute__((swift_name("AIModelPermission")))
@interface YChatAIModelPermission : YChatBase
- (instancetype)initWithId:(NSString *)id allowCreateEngine:(BOOL)allowCreateEngine allowSampling:(BOOL)allowSampling allowLogProbs:(BOOL)allowLogProbs allowSearchIndices:(BOOL)allowSearchIndices allowView:(BOOL)allowView allowFineTuning:(BOOL)allowFineTuning organization:(NSString *)organization isBlocking:(BOOL)isBlocking __attribute__((swift_name("init(id:allowCreateEngine:allowSampling:allowLogProbs:allowSearchIndices:allowView:allowFineTuning:organization:isBlocking:)"))) __attribute__((objc_designated_initializer));
- (NSString *)component1 __attribute__((swift_name("component1()"))) __attribute__((deprecated("use corresponding property instead")));
- (BOOL)component2 __attribute__((swift_name("component2()"))) __attribute__((deprecated("use corresponding property instead")));
- (BOOL)component3 __attribute__((swift_name("component3()"))) __attribute__((deprecated("use corresponding property instead")));
- (BOOL)component4 __attribute__((swift_name("component4()"))) __attribute__((deprecated("use corresponding property instead")));
- (BOOL)component5 __attribute__((swift_name("component5()"))) __attribute__((deprecated("use corresponding property instead")));
- (BOOL)component6 __attribute__((swift_name("component6()"))) __attribute__((deprecated("use corresponding property instead")));
- (BOOL)component7 __attribute__((swift_name("component7()"))) __attribute__((deprecated("use corresponding property instead")));
- (NSString *)component8 __attribute__((swift_name("component8()"))) __attribute__((deprecated("use corresponding property instead")));
- (BOOL)component9 __attribute__((swift_name("component9()"))) __attribute__((deprecated("use corresponding property instead")));
- (YChatAIModelPermission *)doCopyId:(NSString *)id allowCreateEngine:(BOOL)allowCreateEngine allowSampling:(BOOL)allowSampling allowLogProbs:(BOOL)allowLogProbs allowSearchIndices:(BOOL)allowSearchIndices allowView:(BOOL)allowView allowFineTuning:(BOOL)allowFineTuning organization:(NSString *)organization isBlocking:(BOOL)isBlocking __attribute__((swift_name("doCopy(id:allowCreateEngine:allowSampling:allowLogProbs:allowSearchIndices:allowView:allowFineTuning:organization:isBlocking:)")));
- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)")));
- (NSUInteger)hash __attribute__((swift_name("hash()")));
- (NSString *)description __attribute__((swift_name("description()")));
@property (readonly) BOOL allowCreateEngine __attribute__((swift_name("allowCreateEngine")));
@property (readonly) BOOL allowFineTuning __attribute__((swift_name("allowFineTuning")));
@property (readonly) BOOL allowLogProbs __attribute__((swift_name("allowLogProbs")));
@property (readonly) BOOL allowSampling __attribute__((swift_name("allowSampling")));
@property (readonly) BOOL allowSearchIndices __attribute__((swift_name("allowSearchIndices")));
@property (readonly) BOOL allowView __attribute__((swift_name("allowView")));
@property (readonly) NSString *id __attribute__((swift_name("id")));
@property (readonly) BOOL isBlocking __attribute__((swift_name("isBlocking")));
@property (readonly) NSString *organization __attribute__((swift_name("organization")));
@end

__attribute__((objc_subclassing_restricted))
__attribute__((swift_name("ChatMessage")))
@interface YChatChatMessage : YChatBase
Expand Down Expand Up @@ -294,6 +340,30 @@ __attribute__((swift_name("ImageGenerations")))
- (id<YChatImageGenerations>)setSizeSize:(NSString *)size __attribute__((swift_name("setSize(size:)")));
@end

__attribute__((swift_name("ListModels")))
@protocol YChatListModels
@required

/**
* @note This method converts instances of CancellationException, ChatGptException to errors.
* Other uncaught Kotlin exceptions are fatal.
*/
- (void)executeWithCompletionHandler:(void (^)(NSArray<YChatAIModel *> * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("execute(completionHandler:)")));
- (void)executeCallback_:(id<YChatYChatCallback>)callback __attribute__((swift_name("execute(callback_:)")));
@end

__attribute__((swift_name("RetrieveModel")))
@protocol YChatRetrieveModel
@required

/**
* @note This method converts instances of CancellationException, ChatGptException to errors.
* Other uncaught Kotlin exceptions are fatal.
*/
- (void)executeId:(NSString *)id completionHandler:(void (^)(YChatAIModel * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("execute(id:completionHandler:)")));
- (void)executeId:(NSString *)id callback:(id<YChatYChatCallback>)callback __attribute__((swift_name("execute(id:callback:)")));
@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.
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.1.1
VERSION_NAME=1.2.0
IOS_NAME=YChat

# OSS
Expand Down

0 comments on commit 79faba6

Please sign in to comment.