Skip to content

Commit 80a3e12

Browse files
committed
Add missing type
1 parent 360d876 commit 80a3e12

File tree

1 file changed

+4
-2
lines changed
  • instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2

1 file changed

+4
-2
lines changed

instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
from __future__ import annotations
16+
1517
from os import environ
16-
from typing import Mapping, Optional, Union
18+
from typing import Mapping
1719
from urllib.parse import urlparse
1820

1921
from httpx import URL
@@ -179,7 +181,7 @@ def is_streaming(kwargs):
179181
return non_numerical_value_is_set(kwargs.get("stream"))
180182

181183

182-
def non_numerical_value_is_set(value: Optional[Union[bool, str]]):
184+
def non_numerical_value_is_set(value: bool | str | NotGiven | None):
183185
return bool(value) and value_is_set(value)
184186

185187

0 commit comments

Comments
 (0)