Add configurable streaming and embeddings support for OpenAI provider#3707
Add configurable streaming and embeddings support for OpenAI provider#3707casassg wants to merge 5 commits intoblock:mainfrom
Conversation
|
makes sense - but what is the need for this? to try things out? compatibility or preference? |
Compatibility. Some providers may not offer streaming (due to various reasons). In this specific case its due to some issues w sagemaker streaming with OpenAI compatible endpoint. |
DOsinga
left a comment
There was a problem hiding this comment.
I think there's no reason to make this specific to OpenAI - if we want to be able to override streaming and embedding, we should do this at the level where this is checked against the provider. I would like to keep the number of environment variables somewhat under control and the provider specific one especially.
I also think it should be called DISABLE since false is a better default
|
Fine by me, lmk if I can help test the PR using openai compatible apis |
|
thanks for this - will close this in favour of other inbound changes |
Summary
Adds
OPENAI_ENABLE_STREAMINGandOPENAI_ENABLE_EMBEDDINGSenvironment variables to allow disabling streaming and embeddings functionality in the OpenAI provider. Both default to true for backward compatibility.Changes
OpenAiProviderstruct and updatedsupports_streaming()andsupports_embeddings()methodsUse Cases
Configuration
Backward Compatibility
✅ No breaking changes - all existing configurations continue to work unchanged.