Open jayendranarumugam opened 1 month ago
I don't think those stream options are supported by the Azure OpenAI API yet, or am I missing something?
It is supported now. I can able to get the desired results using 2024-06-01
version. The only downside it its not working for image_url
type alone, rest all working fine
I've been waiting for this feature for a while now and keeping my eye on the docs and versions. There is no documentation on stream-options.
https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#data-plane-inference
are you sure you are calling an Azure OpenAI endpoint and not OpenAI itself?
Yes I tried azure openai not openai. Its available there officially from the 2024-09-01-preview but its unofficially working even from 2024-06-01
:)
thanks! I'll have a look at it
I was using this reference code to calculate the openai streaming tokens. This was working all good.
However when i start using the new feature
"stream_options": {"include_usage": true}
which might only work for text prompt and not give the usage details for image inputsimage_url
due to some unknown limitation or a bug. Hence we have to use our own logic above for calculating the usage tokens.Coming to the main issue. The above code is throwing
The HTTP/2 server reset the stream. HTTP/2 error code 'INTERNAL_ERROR' (0x2). (HttpProtocolError)