-
-
Notifications
You must be signed in to change notification settings - Fork 492
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
Undefined array key "openai-processing-ms" #218
Comments
This library expects a |
Is there a possibility to remove the dependency for the header? |
@DC-Sebastian You can add the header to a response before it is processed by the library. The exact way to do this would depend on the HTTP client you are using. Here is a quick example for Guzzle:
|
This started happening for me too. I'm using Azure OpenAi. |
Hello. The same error may occur in the future due to specification changes on the API side. |
I am trying to use the AI provider Anyscale, which provides Metas Llama-2 models and returns them in the same structure as Open AI. With the official Python Open AI library this is possible by simply setting the OPENAI_API_BASE URI to https://api.endpoints.anyscale.com/v1.
When I try to use the base uri api.endpoints.anyscale.com/v1 with openai-php I get the error message:
Undefined array key "openai-processing-ms" in C:\xampp\htdocs\chatgpt\vendor\openai-php\client\src\Responses\Meta\MetaInformation.php on line 37
Any idea what could be causing this?
Here is the code I use for this:
$client = OpenAI::factory() ->withApiKey($yourApiKey) ->withBaseUri('api.endpoints.anyscale.com/v1') ->make();
The text was updated successfully, but these errors were encountered: