openai-api-rs icon indicating copy to clipboard operation
openai-api-rs copied to clipboard

Optional auth header and with api keys | works with azure

Open hiteshjoshi opened this issue 7 months ago • 3 comments

In some APIs eg azure the auth headers are optional and you required api-key as header.

hiteshjoshi avatar Apr 18 '25 07:04 hiteshjoshi

https://github.com/dongri/openai-api-rs/pull/158/files#diff-c512864ccf556037c56e04e6a35753d9c842628cb5e367665a65f30bc2829477R143-R150 This will affect the existing process, so it should be avoided.
Please try to come up with a solution using either the path or query parameters.

dongri avatar Apr 18 '25 08:04 dongri

@dongri how about now

hiteshjoshi avatar Apr 27 '25 10:04 hiteshjoshi

@hiteshjoshi Could you write the actual Azure API endpoint and documentation link?
I want to actually try accessing it. I’d like to clarify whether setting the API key results in an error.

dongri avatar May 01 '25 04:05 dongri

@dongri azure rest docs

hiteshjoshi avatar May 10 '25 17:05 hiteshjoshi