Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Metadata cannot be obtained properly when using Azure AI #295

Closed
rkgo55 opened this issue Dec 19, 2023 · 2 comments
Closed

[Bug]: Metadata cannot be obtained properly when using Azure AI #295

rkgo55 opened this issue Dec 19, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@rkgo55
Copy link

rkgo55 commented Dec 19, 2023

Description

Hello, this library always helps me

The metadata is retrieved from the header, but it doesn't seem to be parsed properly.
The azure AI header looks like this: (notice: The type is different from that of openAI)

array:14 [ // vendor/openai-php/client/src/Responses/Meta/MetaInformation.php:31
~ Omitted ~
  "x-ratelimit-remaining-requests" => array:1 [
    0 => INT
  ]
  "x-ratelimit-remaining-tokens" => array:1 [
    0 => INT
  ]
~ Omitted ~
]

Steps To Reproduce

  • Load dump into MetaInformation
  • version: 2023-10-01-preview

$response = $client->chat()->create([
'messages' => [
['role' => 'system', 'content' => 'hello'],
],
]);

OpenAI PHP Client Version

0.8.0

PHP Version

8.1.13

Notes

No response

@rkgo55 rkgo55 added the bug Something isn't working label Dec 19, 2023
@rkgo55
Copy link
Author

rkgo55 commented Dec 20, 2023

For those who are having trouble with this bug
You can avoid it using the method below.
#218 (comment)

@gehrisandro
Copy link
Collaborator

Fixed #307

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants