async-openai icon indicating copy to clipboard operation
async-openai copied to clipboard

Fix parsing of inf strings

Open ysimonson opened this issue 11 months ago • 0 comments

Server events MaxResponseOutputTokens will currently not parse:

called `Result::unwrap()` on an `Err` value: JSON decode error: data did not match any variant of untagged enum MaxResponseOutputTokens

This fixes the issue, though it's a hack as it doesn't validate that the string is inf. I'm not sure how to do that in serde without writing a custom deserializer/visitor.

ysimonson avatar Dec 30 '24 12:12 ysimonson