openai-php / client

⚡️ OpenAI PHP is a supercharged community-maintained PHP API client that allows you to interact with OpenAI API.
MIT License
4.56k stars 466 forks source link

[Request] I want to get raw response headers. #326

Open rkgo55 opened 5 months ago

rkgo55 commented 5 months ago

Thanks again. This library has a parsing function in MetaInformation.php, but this parsing is not sufficient when using services other than OpenAI.

Example 1) The following headers are added only when using Azure API Management.

  "x-openai-backendurl" => array:1 [
    0 => "https://{DOMAIN}/openai/deployments/{MODEL_NAME}"
  ]

It seems very difficult to cover everything in the library, so we would like the raw response headers to be included in MetaInformation.php

gehrisandro commented 5 months ago

Hi @rkgo55

Thank you very much for your suggestion. We may add this in a future release.