leafo / lua-openai

OpenAI API bindings for Lua
MIT License
52 stars 5 forks source link

Support additional headers #4

Open johnd0e opened 7 months ago

leafo commented 7 months ago

Could you explain more about why you want this, and why it should be something stored on the client instance?

Thanks

johnd0e commented 7 months ago

Sure. For example OpenAI-Organization. And there are some 3rd-party services, that are not exactly openai-compatible, and require extra headers to pass additional info. E.g. see https://docs.helicone.ai/getting-started/integration-method/openai-proxy

leafo commented 6 months ago

Thanks for the contribution. My only suggestion is that the more_headers argument takes precedence over the instance level headers object, meaning it's merged after the headers object

johnd0e commented 6 months ago

My only suggestion is [...]

Sure. Done