I know we can specify headers now when we initialize OpenAIConfig, but as far as I try to look it up, I couldn't find the way to specify a header for each request.
For example, I'd like to specify different header values for each time calling opneAI.chatCompletion(). It would be great if we could specify a header for each method.
Possible solutions
There are request classes such as ChatCompletionRequest or CompletionRequest, so creating a base class for those request classes that have a field for headers and inherit it?
Feature Description / Problem it Solves
I know we can specify headers now when we initialize OpenAIConfig, but as far as I try to look it up, I couldn't find the way to specify a header for each request.
For example, I'd like to specify different header values for each time calling
opneAI.chatCompletion()
. It would be great if we could specify a header for each method.Possible solutions
There are request classes such as
ChatCompletionRequest
orCompletionRequest
, so creating a base class for those request classes that have a field for headers and inherit it?