emacs-openai / openai

Elisp library for the OpenAI API
GNU General Public License v3.0
100 stars 17 forks source link

Add option for api-key header for azure openai deployment #22

Closed lilactown closed 1 year ago

lilactown commented 1 year ago

16 allows you to use bearer tokens with azure openai, but I would like to use a long lived token that Azure provides. These tokens are not normal bearer tokens that are passed via the Authorization header, but are instead passed via an api-key header.

Allowing this to be configured (global config and/or per-request) would be helpful.

jcs090218 commented 1 year ago

That's a good idea! Would you like to open a PR for this? 🤔

lilactown commented 1 year ago

I could, but I'm not very good at elisp. I'll open a PR for feedback!