openai-php / client

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

Undefined array key "transient" #158

Closed VitalijOd closed 1 year ago

VitalijOd commented 1 year ago

Since yesterday, I have been receiving an error when using the Whisper model:

Undefined array key "transient" {"exception":"[object] (ErrorException(code: 0): Undefined array key \"transient\" at /vendor/openai-php/client/src/Responses/Audio/TranscriptionResponseSegment.php:56)

It seems that the API may no longer return the "transient" property.

thoasty-dev commented 1 year ago

Same problem here. Is there any OpenAI documentation at all that would tell me this before it happens?

klaja commented 1 year ago

Obviously something changed in the OpenAI API, as a quickfix (to get the library working again) the following diff seems to work:

`diff --git a/html/vendor/openai-php/client/src/Responses/Audio/TranscriptionResponseSegment.php b/html/vendor/openai-php/client/src/Responses/Audio/TranscriptionResponseSegment.php index de31603..0294404 100644 --- a/html/vendor/openai-php/client/src/Responses/Audio/TranscriptionResponseSegment.php +++ b/html/vendor/openai-php/client/src/Responses/Audio/TranscriptionResponseSegment.php @@ -53,7 +53,7 @@ final class TranscriptionResponseSegment implements ResponseContract $attributes['avg_logprob'], $attributes['compression_ratio'], $attributes['no_speech_prob'],

nunomaduro commented 1 year ago

Can any of you make a pull request?

KaracsonyMarton commented 1 year ago

Same problem here.

nunomaduro commented 1 year ago

@KaracsonyMarton @klaja @VitalijOd @thoasty-dev Would be cool to have one of you doing a pull request, so we can tag a new release with it.

thoasty-dev commented 1 year ago

Thank you for your quick support Nuno, I just opened a PR

nunomaduro commented 1 year ago

Fixed on v0.6.3. Please consider talking with your bosses to sponsoring our work on GitHub sponsors, because having the availability to simply doing releases during the week is expensive.