Skip to content
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

[fix] strip auth params from multipart/form-data post request #28

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

bdtky
Copy link
Contributor

@bdtky bdtky commented Jul 18, 2024

Fixes an api error for multipart/form-data when passing the openai api key as a param (#27).

I have tested this works with Files.create_file/3 using a pdf document. I haven't touched the tests since I didn't see a precedent for when the api key is passed as a param. Open to feedback / happy to make additional changes, or to coauthor the PR, as is convenient.

@dvcrn
Copy link
Owner

dvcrn commented Jul 18, 2024

Thanks for this! Let me go ahead and merge this to get it into the next release. Could you try adding a test in a separate PR? I think this is something we should add testcases for

@dvcrn dvcrn merged commit e58ef98 into dvcrn:main Jul 18, 2024
1 check passed
@dvcrn
Copy link
Owner

dvcrn commented Jul 18, 2024

@bdtky
Copy link
Contributor Author

bdtky commented Jul 18, 2024

Thanks for this! Let me go ahead and merge this to get it into the next release. Could you try adding a test in a separate PR? I think this is something we should add testcases for

Yes I'd be happy to! I should have time tomorrow or early next week, so I will send another PR soon.

I am thinking to add a small sample pdf in the testdata, create a new cassette and assert the request body when calling with api key in opts. Please let me know if you prefer another approach!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants