-
-
Notifications
You must be signed in to change notification settings - Fork 116
[Platform] Prepend ImageNormalizer in OpenAIContract
#489
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
Conversation
Fixes serialization of Image messages as Image rather than its parent File.
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.
Not sure, maybe the FileNormalizer is just to abstract and should rather be a DocumentNormalizer - does that work out?
|
Narrowing down the There is a unit test in the commit introducing it which asserts that the normalizer can also handle |
@glengemann can you comment? what was intended there? |
|
Actually, the original intention was only to support |
|
Thanks @glengemann for the fast feedback! Let's go with limiting the |
|
And renameing |
|
Oskar, yes, that would be fine. We named it file to match the JSON key ("type": "file") in the request. However, now it seems more appropriate to call it Document. {
"type": "file",
"file": {
"file_id": "file-6F2ksmvXxt4VdoqmHRw6kL"
}
}, |
|
I renamed the class in |
OpenAIContract
OpenAIContractOpenAIContract
OpenAIContractImageNormalizer in OpenAIContract
|
Closed in favor of #496 |
Fixes serialization of Image messages as Image
rather than its parent File.