dvcrn / ex_openai

Auto-generated Elixir SDK for OpenAI APIs with full typespecs, docs and streaming support
MIT License
71 stars 27 forks source link

Add `http_headers` config option to allow beta headers #14

Closed emcmanus closed 7 months ago

emcmanus commented 7 months ago

The Assistants API requires a special beta header, which is not currently supported.

This PR allows you to specify default headers, e.g.:

config :ex_openai,
  # ...
  http_headers: [
    {"OpenAI-Beta", "assistants=v1"}
  ]
dvcrn commented 7 months ago

Thanks for the PR! Could you add a quick line to the README that explains this change? Maybe under example configuration?

emcmanus commented 7 months ago

For sure! Pushed. Thanks for your work on this.

dvcrn commented 7 months ago

awesome! thank you ❤️