Closed rkgo55 closed 5 months ago
It would be better to make the following modifications as in the SpeechStreamResponse response
/**
* Creates a new Stream Response instance.
*
* @param class-string<TResponse> $responseClass
*/
public function __construct(
private readonly string $responseClass,
private readonly ResponseInterface $response,
) {
//
}
+ public function meta(): MetaInformation
+ {
+ // @phpstan-ignore-next-line
+ return MetaInformation::from($this->response->getHeaders());
+ }
Sorry, it already existed.
This library has always helped me.
Now, if we can get MetaInformation in StreamResponse now, we can handle the timing of when the RateLimit is about to be hit.
This should be very useful for implementing robust services.
I can confirm that it works fine in my environment with the following modifications. (OpenAI / Azure)