Skip to content

Commit

Permalink
fix(core): nullable OpenAIErrorDetails fields (#315)
Browse files Browse the repository at this point in the history
  • Loading branch information
aallam committed Apr 1, 2024
1 parent 99337b1 commit 445160e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

### Fixed

- **Core**: nullable `OpenAIErrorDetails` fields (#315)
- **Messages**: nullable field `MessageContent.Image#fileId` (#313)

## 3.7.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import kotlinx.serialization.Serializable
*/
@Serializable
public data class OpenAIError(
@SerialName("error") public val detail: OpenAIErrorDetails?,
@SerialName("error") public val detail: OpenAIErrorDetails? = null,
)

/**
Expand All @@ -23,8 +23,8 @@ public data class OpenAIError(
*/
@Serializable
public data class OpenAIErrorDetails(
@SerialName("code") val code: String?,
@SerialName("message") val message: String?,
@SerialName("param") val param: String?,
@SerialName("type") val type: String?,
@SerialName("code") val code: String? = null,
@SerialName("message") val message: String? = null,
@SerialName("param") val param: String? = null,
@SerialName("type") val type: String? = null,
)

0 comments on commit 445160e

Please sign in to comment.