Skip to content

Commit cab7dd4

Browse files
committed
fix: mypy
1 parent 7e8c8c6 commit cab7dd4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/agentchat/realtime_agent/realtime_test_utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
import base64
66
from collections.abc import Callable
77
from functools import wraps
8-
from typing import Any, Literal, TypeVar, Union
8+
from typing import Any, Literal, TypeVar
99
from unittest.mock import MagicMock
1010

1111
from anyio import Event
1212

1313
from autogen.import_utils import optional_import_block
1414

1515
with optional_import_block() as result:
16-
from openai import NotGiven, OpenAI
16+
from openai import Omit, OpenAI
1717

1818
__all__ = ["text_to_speech", "trace"]
1919

@@ -24,7 +24,7 @@ def text_to_speech(
2424
openai_api_key: str,
2525
model: str = "tts-1",
2626
voice: Literal["alloy", "echo", "fable", "onyx", "nova", "shimmer"] = "alloy",
27-
response_format: Union[Literal["mp3", "opus", "aac", "flac", "wav", "pcm"], "NotGiven"] = "pcm",
27+
response_format: Literal["mp3", "opus", "aac", "flac", "wav", "pcm"] | Omit = "pcm",
2828
) -> str:
2929
"""Convert text to voice using OpenAI API.
3030
@@ -33,7 +33,7 @@ def text_to_speech(
3333
openai_api_key (str): OpenAI API key.
3434
model (str, optional): Model to use for the conversion. Defaults to "tts-1".
3535
voice (Literal["alloy", "echo", "fable", "onyx", "nova", "shimmer"], optional): Voice to use for the conversion. Defaults to "alloy".
36-
response_format (Union[Literal["mp3", "opus", "aac", "flac", "wav", "pcm"], NotGiven], optional): Response format. Defaults to "pcm".
36+
response_format (Literal["mp3", "opus", "aac", "flac", "wav", "pcm"] | Omit, optional): Response format. Defaults to "pcm".
3737
3838
Returns:
3939
str: Base64 encoded audio.

0 commit comments

Comments
 (0)