Update OpenaiTemplate.py

This commit is contained in:
H Lohaus 2025-10-02 08:20:23 +02:00 committed by GitHub
parent 3d264705b0
commit c5670047b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -127,7 +127,7 @@ class OpenaiTemplate(AsyncGeneratorProvider, ProviderModelMixin, RaiseErrorMixin
if stream:
kwargs.setdefault("stream_options", {"include_usage": True})
extra_parameters = {key: kwargs[key] for key in extra_parameters if key in kwargs}
extra_parameters = filter_none(**{key: kwargs.get(key) for key in extra_parameters})
if extra_body is None:
extra_body = {}
data = filter_none(