Skip to content

Commit

Permalink
Update Types.kt To Fix Annoying Issue google-gemini#220
Browse files Browse the repository at this point in the history
fix google-gemini#220 by making details field optional and providing empty list as a default (dead simple)
  • Loading branch information
bpavuk authored Nov 30, 2024
1 parent b5d2e56 commit 2c5bf2d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,6 @@ enum class FinishReason {
}

@Serializable
data class GRpcError(val code: Int, val message: String, val details: List<GRpcErrorDetails>)
data class GRpcError(val code: Int, val message: String, val details: List<GRpcErrorDetails> = emptyList())

@Serializable data class GRpcErrorDetails(val reason: String? = null)

0 comments on commit 2c5bf2d

Please sign in to comment.