Skip to content

Commit 79faba6

Browse files
authored
Merge pull request #58 from yml-org/releases/1.2.0
chore: Increment version and update swift package
2 parents 571dddd + a78c4e6 commit 79faba6

File tree

7 files changed

+146
-6
lines changed

7 files changed

+146
-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.1.1")
62+
implementation("co.yml:ychat:1.2.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:
8.55 MB
Binary file not shown.

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

Lines changed: 72 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, YChatChatMessage, YChatKotlinArray<T>, YChatKotlinException, YChatKotlinRuntimeException, YChatKotlinIllegalStateException;
9+
@class YChatKotlinThrowable, YChatYChatCompanion, YChatAIModelPermission, YChatAIModel, YChatChatMessage, YChatKotlinArray<T>, YChatKotlinException, YChatKotlinRuntimeException, YChatKotlinIllegalStateException;
1010

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

1313
NS_ASSUME_NONNULL_BEGIN
1414
#pragma clang diagnostic push
@@ -151,6 +151,8 @@ __attribute__((swift_name("YChat")))
151151
- (id<YChatCompletion>)completion __attribute__((swift_name("completion()")));
152152
- (id<YChatEdits>)edits __attribute__((swift_name("edits()")));
153153
- (id<YChatImageGenerations>)imageGenerations __attribute__((swift_name("imageGenerations()")));
154+
- (id<YChatListModels>)listModels __attribute__((swift_name("listModels()")));
155+
- (id<YChatRetrieveModel>)retrieveModel __attribute__((swift_name("retrieveModel()")));
154156
@end
155157

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

180+
__attribute__((objc_subclassing_restricted))
181+
__attribute__((swift_name("AIModel")))
182+
@interface YChatAIModel : YChatBase
183+
- (instancetype)initWithId:(NSString *)id ownedBy:(NSString *)ownedBy permission:(NSArray<YChatAIModelPermission *> *)permission __attribute__((swift_name("init(id:ownedBy:permission:)"))) __attribute__((objc_designated_initializer));
184+
- (NSString *)component1 __attribute__((swift_name("component1()"))) __attribute__((deprecated("use corresponding property instead")));
185+
- (NSString *)component2 __attribute__((swift_name("component2()"))) __attribute__((deprecated("use corresponding property instead")));
186+
- (NSArray<YChatAIModelPermission *> *)component3 __attribute__((swift_name("component3()"))) __attribute__((deprecated("use corresponding property instead")));
187+
- (YChatAIModel *)doCopyId:(NSString *)id ownedBy:(NSString *)ownedBy permission:(NSArray<YChatAIModelPermission *> *)permission __attribute__((swift_name("doCopy(id:ownedBy:permission:)")));
188+
- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)")));
189+
- (NSUInteger)hash __attribute__((swift_name("hash()")));
190+
- (NSString *)description __attribute__((swift_name("description()")));
191+
@property (readonly) NSString *id __attribute__((swift_name("id")));
192+
@property (readonly) NSString *ownedBy __attribute__((swift_name("ownedBy")));
193+
@property (readonly) NSArray<YChatAIModelPermission *> *permission __attribute__((swift_name("permission")));
194+
@end
195+
196+
__attribute__((objc_subclassing_restricted))
197+
__attribute__((swift_name("AIModelPermission")))
198+
@interface YChatAIModelPermission : YChatBase
199+
- (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));
200+
- (NSString *)component1 __attribute__((swift_name("component1()"))) __attribute__((deprecated("use corresponding property instead")));
201+
- (BOOL)component2 __attribute__((swift_name("component2()"))) __attribute__((deprecated("use corresponding property instead")));
202+
- (BOOL)component3 __attribute__((swift_name("component3()"))) __attribute__((deprecated("use corresponding property instead")));
203+
- (BOOL)component4 __attribute__((swift_name("component4()"))) __attribute__((deprecated("use corresponding property instead")));
204+
- (BOOL)component5 __attribute__((swift_name("component5()"))) __attribute__((deprecated("use corresponding property instead")));
205+
- (BOOL)component6 __attribute__((swift_name("component6()"))) __attribute__((deprecated("use corresponding property instead")));
206+
- (BOOL)component7 __attribute__((swift_name("component7()"))) __attribute__((deprecated("use corresponding property instead")));
207+
- (NSString *)component8 __attribute__((swift_name("component8()"))) __attribute__((deprecated("use corresponding property instead")));
208+
- (BOOL)component9 __attribute__((swift_name("component9()"))) __attribute__((deprecated("use corresponding property instead")));
209+
- (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:)")));
210+
- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)")));
211+
- (NSUInteger)hash __attribute__((swift_name("hash()")));
212+
- (NSString *)description __attribute__((swift_name("description()")));
213+
@property (readonly) BOOL allowCreateEngine __attribute__((swift_name("allowCreateEngine")));
214+
@property (readonly) BOOL allowFineTuning __attribute__((swift_name("allowFineTuning")));
215+
@property (readonly) BOOL allowLogProbs __attribute__((swift_name("allowLogProbs")));
216+
@property (readonly) BOOL allowSampling __attribute__((swift_name("allowSampling")));
217+
@property (readonly) BOOL allowSearchIndices __attribute__((swift_name("allowSearchIndices")));
218+
@property (readonly) BOOL allowView __attribute__((swift_name("allowView")));
219+
@property (readonly) NSString *id __attribute__((swift_name("id")));
220+
@property (readonly) BOOL isBlocking __attribute__((swift_name("isBlocking")));
221+
@property (readonly) NSString *organization __attribute__((swift_name("organization")));
222+
@end
223+
178224
__attribute__((objc_subclassing_restricted))
179225
__attribute__((swift_name("ChatMessage")))
180226
@interface YChatChatMessage : YChatBase
@@ -294,6 +340,30 @@ __attribute__((swift_name("ImageGenerations")))
294340
- (id<YChatImageGenerations>)setSizeSize:(NSString *)size __attribute__((swift_name("setSize(size:)")));
295341
@end
296342

343+
__attribute__((swift_name("ListModels")))
344+
@protocol YChatListModels
345+
@required
346+
347+
/**
348+
* @note This method converts instances of CancellationException, ChatGptException to errors.
349+
* Other uncaught Kotlin exceptions are fatal.
350+
*/
351+
- (void)executeWithCompletionHandler:(void (^)(NSArray<YChatAIModel *> * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("execute(completionHandler:)")));
352+
- (void)executeCallback_:(id<YChatYChatCallback>)callback __attribute__((swift_name("execute(callback_:)")));
353+
@end
354+
355+
__attribute__((swift_name("RetrieveModel")))
356+
@protocol YChatRetrieveModel
357+
@required
358+
359+
/**
360+
* @note This method converts instances of CancellationException, ChatGptException to errors.
361+
* Other uncaught Kotlin exceptions are fatal.
362+
*/
363+
- (void)executeId:(NSString *)id completionHandler:(void (^)(YChatAIModel * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("execute(id:completionHandler:)")));
364+
- (void)executeId:(NSString *)id callback:(id<YChatYChatCallback>)callback __attribute__((swift_name("execute(id:callback:)")));
365+
@end
366+
297367
__attribute__((objc_subclassing_restricted))
298368
__attribute__((swift_name("KotlinArray")))
299369
@interface YChatKotlinArray<T> : YChatBase
Binary file not shown.

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

Lines changed: 72 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, YChatChatMessage, YChatKotlinArray<T>, YChatKotlinException, YChatKotlinRuntimeException, YChatKotlinIllegalStateException;
9+
@class YChatKotlinThrowable, YChatYChatCompanion, YChatAIModelPermission, YChatAIModel, YChatChatMessage, YChatKotlinArray<T>, YChatKotlinException, YChatKotlinRuntimeException, YChatKotlinIllegalStateException;
1010

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

1313
NS_ASSUME_NONNULL_BEGIN
1414
#pragma clang diagnostic push
@@ -151,6 +151,8 @@ __attribute__((swift_name("YChat")))
151151
- (id<YChatCompletion>)completion __attribute__((swift_name("completion()")));
152152
- (id<YChatEdits>)edits __attribute__((swift_name("edits()")));
153153
- (id<YChatImageGenerations>)imageGenerations __attribute__((swift_name("imageGenerations()")));
154+
- (id<YChatListModels>)listModels __attribute__((swift_name("listModels()")));
155+
- (id<YChatRetrieveModel>)retrieveModel __attribute__((swift_name("retrieveModel()")));
154156
@end
155157

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

180+
__attribute__((objc_subclassing_restricted))
181+
__attribute__((swift_name("AIModel")))
182+
@interface YChatAIModel : YChatBase
183+
- (instancetype)initWithId:(NSString *)id ownedBy:(NSString *)ownedBy permission:(NSArray<YChatAIModelPermission *> *)permission __attribute__((swift_name("init(id:ownedBy:permission:)"))) __attribute__((objc_designated_initializer));
184+
- (NSString *)component1 __attribute__((swift_name("component1()"))) __attribute__((deprecated("use corresponding property instead")));
185+
- (NSString *)component2 __attribute__((swift_name("component2()"))) __attribute__((deprecated("use corresponding property instead")));
186+
- (NSArray<YChatAIModelPermission *> *)component3 __attribute__((swift_name("component3()"))) __attribute__((deprecated("use corresponding property instead")));
187+
- (YChatAIModel *)doCopyId:(NSString *)id ownedBy:(NSString *)ownedBy permission:(NSArray<YChatAIModelPermission *> *)permission __attribute__((swift_name("doCopy(id:ownedBy:permission:)")));
188+
- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)")));
189+
- (NSUInteger)hash __attribute__((swift_name("hash()")));
190+
- (NSString *)description __attribute__((swift_name("description()")));
191+
@property (readonly) NSString *id __attribute__((swift_name("id")));
192+
@property (readonly) NSString *ownedBy __attribute__((swift_name("ownedBy")));
193+
@property (readonly) NSArray<YChatAIModelPermission *> *permission __attribute__((swift_name("permission")));
194+
@end
195+
196+
__attribute__((objc_subclassing_restricted))
197+
__attribute__((swift_name("AIModelPermission")))
198+
@interface YChatAIModelPermission : YChatBase
199+
- (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));
200+
- (NSString *)component1 __attribute__((swift_name("component1()"))) __attribute__((deprecated("use corresponding property instead")));
201+
- (BOOL)component2 __attribute__((swift_name("component2()"))) __attribute__((deprecated("use corresponding property instead")));
202+
- (BOOL)component3 __attribute__((swift_name("component3()"))) __attribute__((deprecated("use corresponding property instead")));
203+
- (BOOL)component4 __attribute__((swift_name("component4()"))) __attribute__((deprecated("use corresponding property instead")));
204+
- (BOOL)component5 __attribute__((swift_name("component5()"))) __attribute__((deprecated("use corresponding property instead")));
205+
- (BOOL)component6 __attribute__((swift_name("component6()"))) __attribute__((deprecated("use corresponding property instead")));
206+
- (BOOL)component7 __attribute__((swift_name("component7()"))) __attribute__((deprecated("use corresponding property instead")));
207+
- (NSString *)component8 __attribute__((swift_name("component8()"))) __attribute__((deprecated("use corresponding property instead")));
208+
- (BOOL)component9 __attribute__((swift_name("component9()"))) __attribute__((deprecated("use corresponding property instead")));
209+
- (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:)")));
210+
- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)")));
211+
- (NSUInteger)hash __attribute__((swift_name("hash()")));
212+
- (NSString *)description __attribute__((swift_name("description()")));
213+
@property (readonly) BOOL allowCreateEngine __attribute__((swift_name("allowCreateEngine")));
214+
@property (readonly) BOOL allowFineTuning __attribute__((swift_name("allowFineTuning")));
215+
@property (readonly) BOOL allowLogProbs __attribute__((swift_name("allowLogProbs")));
216+
@property (readonly) BOOL allowSampling __attribute__((swift_name("allowSampling")));
217+
@property (readonly) BOOL allowSearchIndices __attribute__((swift_name("allowSearchIndices")));
218+
@property (readonly) BOOL allowView __attribute__((swift_name("allowView")));
219+
@property (readonly) NSString *id __attribute__((swift_name("id")));
220+
@property (readonly) BOOL isBlocking __attribute__((swift_name("isBlocking")));
221+
@property (readonly) NSString *organization __attribute__((swift_name("organization")));
222+
@end
223+
178224
__attribute__((objc_subclassing_restricted))
179225
__attribute__((swift_name("ChatMessage")))
180226
@interface YChatChatMessage : YChatBase
@@ -294,6 +340,30 @@ __attribute__((swift_name("ImageGenerations")))
294340
- (id<YChatImageGenerations>)setSizeSize:(NSString *)size __attribute__((swift_name("setSize(size:)")));
295341
@end
296342

343+
__attribute__((swift_name("ListModels")))
344+
@protocol YChatListModels
345+
@required
346+
347+
/**
348+
* @note This method converts instances of CancellationException, ChatGptException to errors.
349+
* Other uncaught Kotlin exceptions are fatal.
350+
*/
351+
- (void)executeWithCompletionHandler:(void (^)(NSArray<YChatAIModel *> * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("execute(completionHandler:)")));
352+
- (void)executeCallback_:(id<YChatYChatCallback>)callback __attribute__((swift_name("execute(callback_:)")));
353+
@end
354+
355+
__attribute__((swift_name("RetrieveModel")))
356+
@protocol YChatRetrieveModel
357+
@required
358+
359+
/**
360+
* @note This method converts instances of CancellationException, ChatGptException to errors.
361+
* Other uncaught Kotlin exceptions are fatal.
362+
*/
363+
- (void)executeId:(NSString *)id completionHandler:(void (^)(YChatAIModel * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("execute(id:completionHandler:)")));
364+
- (void)executeId:(NSString *)id callback:(id<YChatYChatCallback>)callback __attribute__((swift_name("execute(id:callback:)")));
365+
@end
366+
297367
__attribute__((objc_subclassing_restricted))
298368
__attribute__((swift_name("KotlinArray")))
299369
@interface YChatKotlinArray<T> : YChatBase
Binary file not shown.

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.1.1
14+
VERSION_NAME=1.2.0
1515
IOS_NAME=YChat
1616

1717
# OSS

0 commit comments

Comments
 (0)