Skip to content

Commit

Permalink
compilable after merging master
Browse files Browse the repository at this point in the history
  • Loading branch information
bburdiliak committed Sep 11, 2024
1 parent 95c1986 commit 84f94de
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 165 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -763,21 +763,21 @@ object JsonFormats {
)(Attachment.apply, unlift(Attachment.unapply))

implicit lazy val assistantReads: Reads[Assistant] = (
(__ \ "id").read[AssistantId] and
(__ \ "id").read[String] and
(__ \ "created_at").read[ju.Date] and
(__ \ "name").readNullable[String] and
(__ \ "description").readNullable[String] and
(__ \ "model").read[String] and
(__ \ "instructions").readNullable[String] and
(__ \ "tools").read[List[AssistantTool]] and
(__ \ "tools").read[Seq[AssistantTool]] and
(__ \ "tool_resources")
.read[Seq[AssistantToolResourceResponse]]
.orElse(Reads.pure(Nil)) and
(__ \ "metadata").read[Map[String, String]].orElse(Reads.pure(Map())) and
(__ \ "temperature").readNullable[Double].orElse(Reads.pure(None)) and
(__ \ "top_p").readNullable[Double].orElse(Reads.pure(None)) and
(__ \ "response_format").read[ResponseFormat]
)((Assistant.apply _))
)(Assistant.apply _)

// implicit lazy val assistantWrites: Writes[Assistant] =
// Json.writes[Assistant]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package io.cequence.openaiscala.domain

final case class AssistantId(id: String) extends AnyVal
Loading

0 comments on commit 84f94de

Please sign in to comment.