-
-
Notifications
You must be signed in to change notification settings - Fork 239
feat(openAI): Add File storage interaction #581
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
feat(openAI): Add File storage interaction #581
Conversation
3777857 to
3fa3082
Compare
|
Since this is very specific to OpenAI, what if we use use it as |
3fa3082 to
4e360a9
Compare
I think that Anthropic, Mistral and Gemini - possibly xAI as well? - all offer file storage interactions as well, so my thinking was keeping it as generic as possible, in case someone wants to add it to the Mistral provider the functionality is already there and they just have to add the handler/methods to the Mistral Provider. That being said I have no issue with making this OpenAI specific if that is acceptable for the Prism package? It was how I had initially written it in my personal project, so should be a quick rewrite :) |
|
@bso-AL Thanks for this.. I am going to use this for now until there is a new update |
|
Going to give this another set of eyes here shortly |
|
I've thought a lot about this and I think I'm going to pass on this for now. I may reconsider in the future but for now I feel likes its out of scope... for now |
Description
First of all thanks for this Package, TJ. I needed some extra functionality for a personal project, but thought maybe more people could make use of it - if you believe this fits within Prism's scope.
This PR adds the functionality of interacting with OpenAI's file storage. It implements the functionality of uploading a file, listing all files in your storage, deleting a file, retrieving a file's information and retrieving a file's content.
I've tried to mimic the current structure as best as possible, but I was a little stumped with regards to making a ResponseBuilder as I see the other "types" have. I ended up making it into a provider specific concern that formats the Responses.
I've tried to keep the Responses as generic as possible in order to future proof if other people want to implement the File storage interaction with other Providers other than OpenAI.