Skip to content

Commit 4e5eb37

Browse files
chore(internal): restructure imports (#1359)
1 parent c117779 commit 4e5eb37

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+95
-109
lines changed

‎src/openai/resources/audio/transcriptions.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@
1818
from ..._compat import cached_property
1919
from ..._resource import SyncAPIResource, AsyncAPIResource
2020
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
21-
from ...types.audio import Transcription, transcription_create_params
21+
from ...types.audio import transcription_create_params
2222
from ..._base_client import (
2323
make_request_options,
2424
)
25+
from ...types.audio.transcription import Transcription
2526

2627
__all__ = ["Transcriptions", "AsyncTranscriptions"]
2728

‎src/openai/resources/audio/translations.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@
1818
from ..._compat import cached_property
1919
from ..._resource import SyncAPIResource, AsyncAPIResource
2020
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
21-
from ...types.audio import Translation, translation_create_params
21+
from ...types.audio import translation_create_params
2222
from ..._base_client import (
2323
make_request_options,
2424
)
25+
from ...types.audio.translation import Translation
2526

2627
__all__ = ["Translations", "AsyncTranslations"]
2728

‎src/openai/resources/batches.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import httpx
99

1010
from .. import _legacy_response
11-
from ..types import Batch, batch_list_params, batch_create_params
11+
from ..types import batch_list_params, batch_create_params
1212
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
1313
from .._utils import (
1414
maybe_transform,
@@ -18,6 +18,7 @@
1818
from .._resource import SyncAPIResource, AsyncAPIResource
1919
from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
2020
from ..pagination import SyncCursorPage, AsyncCursorPage
21+
from ..types.batch import Batch
2122
from .._base_client import (
2223
AsyncPaginator,
2324
make_request_options,

‎src/openai/resources/beta/assistants.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@
1818
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
1919
from ...pagination import SyncCursorPage, AsyncCursorPage
2020
from ...types.beta import (
21-
Assistant,
22-
AssistantDeleted,
23-
AssistantToolParam,
24-
AssistantResponseFormatOptionParam,
2521
assistant_list_params,
2622
assistant_create_params,
2723
assistant_update_params,
@@ -30,6 +26,10 @@
3026
AsyncPaginator,
3127
make_request_options,
3228
)
29+
from ...types.beta.assistant import Assistant
30+
from ...types.beta.assistant_deleted import AssistantDeleted
31+
from ...types.beta.assistant_tool_param import AssistantToolParam
32+
from ...types.beta.assistant_response_format_option_param import AssistantResponseFormatOptionParam
3333

3434
__all__ = ["Assistants", "AsyncAssistants"]
3535

‎src/openai/resources/beta/threads/messages.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
AsyncPaginator,
2222
make_request_options,
2323
)
24-
from ....types.beta.threads import Message, message_list_params, message_create_params, message_update_params
24+
from ....types.beta.threads import message_list_params, message_create_params, message_update_params
25+
from ....types.beta.threads.message import Message
2526

2627
__all__ = ["Messages", "AsyncMessages"]
2728

‎src/openai/resources/beta/threads/runs/runs.py‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@
3131
from ....._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
3232
from ....._streaming import Stream, AsyncStream
3333
from .....pagination import SyncCursorPage, AsyncCursorPage
34-
from .....types.beta import (
35-
AssistantToolParam,
36-
AssistantStreamEvent,
37-
AssistantToolChoiceOptionParam,
38-
AssistantResponseFormatOptionParam,
39-
)
4034
from ....._base_client import (
4135
AsyncPaginator,
4236
make_request_options,
@@ -50,12 +44,16 @@
5044
AsyncAssistantStreamManager,
5145
)
5246
from .....types.beta.threads import (
53-
Run,
5447
run_list_params,
5548
run_create_params,
5649
run_update_params,
5750
run_submit_tool_outputs_params,
5851
)
52+
from .....types.beta.threads.run import Run
53+
from .....types.beta.assistant_tool_param import AssistantToolParam
54+
from .....types.beta.assistant_stream_event import AssistantStreamEvent
55+
from .....types.beta.assistant_tool_choice_option_param import AssistantToolChoiceOptionParam
56+
from .....types.beta.assistant_response_format_option_param import AssistantResponseFormatOptionParam
5957

6058
__all__ = ["Runs", "AsyncRuns"]
6159

‎src/openai/resources/beta/threads/runs/steps.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
AsyncPaginator,
1818
make_request_options,
1919
)
20-
from .....types.beta.threads.runs import RunStep, step_list_params
20+
from .....types.beta.threads.runs import step_list_params
21+
from .....types.beta.threads.runs.run_step import RunStep
2122

2223
__all__ = ["Steps", "AsyncSteps"]
2324

‎src/openai/resources/beta/threads/threads.py‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@
3737
from ...._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
3838
from ...._streaming import Stream, AsyncStream
3939
from ....types.beta import (
40-
Thread,
41-
ThreadDeleted,
42-
AssistantStreamEvent,
43-
AssistantToolChoiceOptionParam,
44-
AssistantResponseFormatOptionParam,
4540
thread_create_params,
4641
thread_update_params,
4742
thread_create_and_run_params,
@@ -57,7 +52,12 @@
5752
AsyncAssistantEventHandlerT,
5853
AsyncAssistantStreamManager,
5954
)
60-
from ....types.beta.threads import Run
55+
from ....types.beta.thread import Thread
56+
from ....types.beta.threads.run import Run
57+
from ....types.beta.thread_deleted import ThreadDeleted
58+
from ....types.beta.assistant_stream_event import AssistantStreamEvent
59+
from ....types.beta.assistant_tool_choice_option_param import AssistantToolChoiceOptionParam
60+
from ....types.beta.assistant_response_format_option_param import AssistantResponseFormatOptionParam
6161

6262
__all__ = ["Threads", "AsyncThreads"]
6363

‎src/openai/resources/beta/vector_stores/file_batches.py‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,9 @@
2626
AsyncPaginator,
2727
make_request_options,
2828
)
29-
from ....types.beta.vector_stores import (
30-
VectorStoreFile,
31-
VectorStoreFileBatch,
32-
file_batch_create_params,
33-
file_batch_list_files_params,
34-
)
29+
from ....types.beta.vector_stores import file_batch_create_params, file_batch_list_files_params
30+
from ....types.beta.vector_stores.vector_store_file import VectorStoreFile
31+
from ....types.beta.vector_stores.vector_store_file_batch import VectorStoreFileBatch
3532

3633
__all__ = ["FileBatches", "AsyncFileBatches"]
3734

‎src/openai/resources/beta/vector_stores/files.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
AsyncPaginator,
2323
make_request_options,
2424
)
25-
from ....types.beta.vector_stores import VectorStoreFile, VectorStoreFileDeleted, file_list_params, file_create_params
25+
from ....types.beta.vector_stores import file_list_params, file_create_params
26+
from ....types.beta.vector_stores.vector_store_file import VectorStoreFile
27+
from ....types.beta.vector_stores.vector_store_file_deleted import VectorStoreFileDeleted
2628

2729
__all__ = ["Files", "AsyncFiles"]
2830

0 commit comments

Comments
 (0)