-
Notifications
You must be signed in to change notification settings - Fork 11
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
Update client4:akka-http-backend, ... to 4.0.0-RC1 #275
Conversation
063f729
to
d9bb41f
Compare
@@ -78,7 +77,7 @@ object CompletionsRequestBody { | |||
SnakePickle.read[ujson.Value](jsonValue) match { | |||
case Str(value) => | |||
byCompletionModelValue.getOrElse(value, CustomCompletionModel(value)) | |||
case e => throw DeserializationOpenAIException(new Exception(s"Could not deserialize: $e")) | |||
case e => throw new Exception(s"Could not deserialize: $e") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zygiert1990 shouldn't we throw DeserializationException
here or the DeserializationOpenAIException
wrapper?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand correctly how does it work I think not. In SttpUpickleApiExtension we have method deserializeJsonSnake, which actually does the deserialization. Inside this method there is try-catch block and it works in that way that it catches all exceptions and wraps them in DeserializationOpenAIException. Having this in mind I changed exception type in all implicit readers, as eventually they will be wrapped into another exception.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, so it would be wrapped twice in effect?
By the way, do we still need DeserializationOpenAIException
? Can't we just use DeserializationException
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes indeed.
We could remove DeserializationOpenAIException
, but we have such or similar signature in some methods Request[Either[OpenAIException, AudioResponse]]
. If we remove this error we will have to adapt existing code (as we won't be able to use OpenAIException
, as a base type here), which of course shouldn't be a problem, but the question is: does it bring to us any value? Doing so, we will break existing error hierarchy, as there are few others custom exceptions in this project, e.g. RateLimitException
, which are also a subtypes of OpenAIException
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, sounds reasonable, so we leave things as-is :)
About this PR
📦 Updates
from
4.0.0-M19
to4.0.0-RC1
📜 GitHub Release Notes - Version Diff
Usage
✅ Please merge!
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a
.scala-steward.conf
file.Have a fantastic day writing Scala!
🔍 Files still referring to the old version number
The following files still refer to the old version number (4.0.0-M19).
You might want to review and update them manually.
⚙ Adjust future updates
Add this to your
.scala-steward.conf
file to ignore future updates of this dependency:Or, add this to slow down future updates of this dependency: