Closed a-elnajjar closed 1 year ago
I have this error when my client iOS App requests from the OpenAI endpoint
▿ Result<OpenAI, OpenAIError>
▿ failure : OpenAIError ▿ decodingError : 1 element ▿ error : DecodingError ▿ keyNotFound : 2 elements - .0 : CodingKeys(stringValue: "object", intValue: nil) ▿ .1 : Context - codingPath : 0 elements - debugDescription : "No value associated with key CodingKeys(stringValue: \"object\", intValue: nil) (\"object\")." - underlyingError : nil
I check the source code of struct OpenAI. can we make change the object to optional? the struct openAI should be like
public struct OpenAI<T: Payload>: Codable { public let object: String? public let model: String? public let choices: [T] }
Yeah it's incoming 👍🏼
thank you
same problem T.T
You can change SPM tag 1.2.0 -> branch Main
New release created which includes this change 👍🏼
I have this error when my client iOS App requests from the OpenAI endpoint
▿ Result<OpenAI, OpenAIError>
I check the source code of struct OpenAI. can we make change the object to optional? the struct openAI should be like