-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The data couldn’t be read because it isn’t in the correct format. #128
Comments
Have the same issue today while using ChatStream |
Started suddnly getting this error too (when streaming), although it was supposedly fixed in #104 |
Also started getting this error suddenly today when streaming |
I've started to suddenly get this error while using chatStream too, and very often. A bit concerning as my app is in production. Trying to find a quick fix. Any suggestions? |
This looks like the best fix: #151 (comment) And the reason is that if |
Perfect. Yes, that fixes it, and makes sense. Thank you @svkozak :) |
Same here, receive this error while using |
I am implementing OpenAI into my iOS app.
I integrated OpenAI library into my iOS app using swiftpackage.
I configured OpenAI api key and implemented "Completion" with prompt text.
But, I have got above issue.
Below are my code.
let openAI = OpenAI(apiToken: "YOUR_TOKEN_HERE")
let query = CompletionsQuery(model: .textDavinci_003, prompt: "What is 42?", temperature: 0, maxTokens: 100, topP: 1, frequencyPenalty: 0, presencePenalty: 0, stop: ["\n"])
openAI.completions(query: query) { result in
switch result {
case .success(let result):
print(result.choices)
case .failure(let error):
//Handle chunk error here
print(error.localizedDescription)
}
}
But, I have got error message - "The data couldn’t be read because it isn’t in the correct format."
How can I solve this issue shortly?
The text was updated successfully, but these errors were encountered: