-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Adding a file to the request does not work #6
Comments
Yeah, I am going to rewrite the library using the better approach, see #5. Sorry for this isn't being 100% ready. 😓 I feel sorry since I created package for my own use, but I will soon make improvements next week! 😅 |
I didn't realize this was still "beta". Amazing work! I was really impressed and I thought I would have to implement something from scratch. |
Thanks! It's not great yet, but I will continue to make improvements! I'm busy for the following two weeks, I will try to work on it the next weekend! :D |
Are you open to PR's or are you planning on doing a complete rewrite? |
I've made quick adjustments (#7) so now all request parameters are all exposed! I was hoping to expose response with class or structure, but unfortunately, I don't have the knowledge to do that now. 😅 I wasn't comfortable asking people to make PR before a rewrite, but now that I've made the adjustment, feel free to open PRs! :D |
Hi, I've recently tried the request but I'm encountering the same issue! After some time of google searching, it seems like there are still some issues with the image requests. I will mark this as won't fix for now since there is no way we can fix it on our side! |
What do you mean by "there are still some issues with the image requests"? Are you referring to a limitation in the request.el library? If so I don't see an issue for this in their tracker. However the image API works fine over curl, so it is not a limitation on the OpenAI side. For example this will work: curl https://api.openai.com/v1/images/variations \
-H 'Authorization: Bearer <your key>' \
-F "image=@</path/to/image.png>" \
-F n=1 \
-F size="256x256" |
openai-image-variation-prompt
does not currently work. it is just passing the filename as a parameter instead of attaching the image itself. I tried to fix this with the code below:However this returns an error from openai
So it looks like it doesn't like mixing form data with json encoded data (and you can't json encode images). I tried to switch to using only form encoding using this:
But that got a different error from openai
I am not very familiar with HTTP so I am stuck on how to get this working. Any help would be appreciated.
The text was updated successfully, but these errors were encountered: