File tree Expand file tree Collapse file tree 1 file changed +37
-2
lines changed
openai-core/src/main/scala/io/cequence/openaiscala/domain/responsesapi Expand file tree Collapse file tree 1 file changed +37
-2
lines changed Original file line number Diff line number Diff line change @@ -355,7 +355,24 @@ object JsonFormats {
355
355
(__ \ " stream" ).writeNullable[Boolean ] and
356
356
(__ \ " temperature" ).writeNullable[Double ] and
357
357
(__ \ " text" ).writeNullable[TextResponseConfig ]
358
- )(unlift(CreateModelResponseSettingsAuxPart1 .unapply))
358
+ )(
359
+ // somehow FineTuneJob.unapply is not working in Scala3
360
+ (x : CreateModelResponseSettingsAuxPart1 ) =>
361
+ (
362
+ x.model,
363
+ x.include,
364
+ x.instructions,
365
+ x.maxOutputTokens,
366
+ x.metadata,
367
+ x.parallelToolCalls,
368
+ x.previousResponseId,
369
+ x.reasoning,
370
+ x.store,
371
+ x.stream,
372
+ x.temperature,
373
+ x.text
374
+ )
375
+ )
359
376
360
377
private implicit lazy val createModelResponseSettingsAuxPart2Reads
361
378
: Reads [CreateModelResponseSettingsAuxPart2 ] =
@@ -391,7 +408,25 @@ object JsonFormats {
391
408
(__ \ " service_tier" ).writeNullable[String ] and
392
409
(__ \ " stream_options" ).writeNullable[StreamOptions ] and
393
410
(__ \ " top_logprobs" ).writeNullable[Int ]
394
- )(unlift(CreateModelResponseSettingsAuxPart2 .unapply))
411
+ )(
412
+ // somehow FineTuneJob.unapply is not working in Scala3
413
+ (x : CreateModelResponseSettingsAuxPart2 ) =>
414
+ (
415
+ x.toolChoice,
416
+ x.tools,
417
+ x.topP,
418
+ x.truncation,
419
+ x.user,
420
+ x.prompt,
421
+ x.promptCacheKey,
422
+ x.background,
423
+ x.maxToolCalls,
424
+ x.safetyIdentifier,
425
+ x.serviceTier,
426
+ x.streamOptions,
427
+ x.topLogprobs
428
+ )
429
+ )
395
430
396
431
// Compose Reads and Writes for CreateModelResponseSettings using the AuxPart1 and AuxPart2
397
432
implicit lazy val createModelResponseSettingsReads : Reads [CreateModelResponseSettings ] =
You can’t perform that action at this time.
0 commit comments