6
6
#import < Foundation/NSString.h>
7
7
#import < Foundation/NSValue.h>
8
8
9
- @class YChatKotlinThrowable, YChatYChatCompanion, YChatChatMessage, YChatKotlinArray<T>, YChatKotlinException, YChatKotlinRuntimeException, YChatKotlinIllegalStateException;
9
+ @class YChatKotlinThrowable, YChatYChatCompanion, YChatAIModelPermission, YChatAIModel, YChatChatMessage, YChatKotlinArray<T>, YChatKotlinException, YChatKotlinRuntimeException, YChatKotlinIllegalStateException;
10
10
11
- @protocol YChatChatCompletions, YChatCompletion, YChatEdits, YChatImageGenerations, YChatYChat, YChatYChatCallback, YChatKotlinIterator;
11
+ @protocol YChatChatCompletions, YChatCompletion, YChatEdits, YChatImageGenerations, YChatListModels, YChatRetrieveModel, YChatYChat, YChatYChatCallback, YChatKotlinIterator;
12
12
13
13
NS_ASSUME_NONNULL_BEGIN
14
14
#pragma clang diagnostic push
@@ -151,6 +151,8 @@ __attribute__((swift_name("YChat")))
151
151
- (id <YChatCompletion>)completion __attribute__ ((swift_name(" completion()" )));
152
152
- (id <YChatEdits>)edits __attribute__ ((swift_name(" edits()" )));
153
153
- (id <YChatImageGenerations>)imageGenerations __attribute__ ((swift_name(" imageGenerations()" )));
154
+ - (id <YChatListModels>)listModels __attribute__ ((swift_name(" listModels()" )));
155
+ - (id <YChatRetrieveModel>)retrieveModel __attribute__ ((swift_name(" retrieveModel()" )));
154
156
@end
155
157
156
158
__attribute__ ((swift_name(" YChatCallback" )))
@@ -175,6 +177,50 @@ __attribute__((swift_name("YChatCompanion")))
175
177
- (id <YChatYChat>)createApiKey:(NSString *)apiKey __attribute__ ((swift_name(" create(apiKey:)" )));
176
178
@end
177
179
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
+
178
224
__attribute__ ((objc_subclassing_restricted))
179
225
__attribute__((swift_name(" ChatMessage" )))
180
226
@interface YChatChatMessage : YChatBase
@@ -294,6 +340,30 @@ __attribute__((swift_name("ImageGenerations")))
294
340
- (id <YChatImageGenerations>)setSizeSize:(NSString *)size __attribute__ ((swift_name(" setSize(size:)" )));
295
341
@end
296
342
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
+
297
367
__attribute__ ((objc_subclassing_restricted))
298
368
__attribute__((swift_name(" KotlinArray" )))
299
369
@interface YChatKotlinArray<T> : YChatBase
0 commit comments