add error alert

This commit is contained in:
leetcode-mafia
2023-04-18 19:42:42 -04:00
parent 82da6641bb
commit b91561d6df
6 changed files with 58 additions and 28 deletions

View File

@ -12,6 +12,12 @@ public struct OpenAI<T: Payload>: Codable {
public let choices: [T]?
public let usage: UsageResult?
public let data: [T]?
public let error: ErrorResult?
}
public struct ErrorResult: Codable, Error {
public let message: String
public let code: String
}
public struct TextResult: Payload {