Skip to content

Commit e4a9553

Browse files
release: 1.23.3 (openai#1360)
* chore(internal): restructure imports (openai#1359) * release: 1.23.3
1 parent c117779 commit e4a9553

Some content is hidden

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

46 files changed

+106
-112
lines changed

.release-please-manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.23.2"
2+
".": "1.23.3"
33
}

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 1.23.3 (2024-04-23)
4+
5+
Full Changelog: [v1.23.2...v1.23.3](https://github.com/openai/openai-python/compare/v1.23.2...v1.23.3)
6+
7+
### Chores
8+
9+
* **internal:** restructure imports ([#1359](https://github.com/openai/openai-python/issues/1359)) ([4e5eb37](https://github.com/openai/openai-python/commit/4e5eb374ea0545a6117db657bb05f6417bc62d18))
10+
311
## 1.23.2 (2024-04-19)
412

513
Full Changelog: [v1.23.1...v1.23.2](https://github.com/openai/openai-python/compare/v1.23.1...v1.23.2)

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "openai"
3-
version = "1.23.2"
3+
version = "1.23.3"
44
description = "The official Python library for the openai API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/openai/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "openai"
4-
__version__ = "1.23.2" # x-release-please-version
4+
__version__ = "1.23.3" # x-release-please-version

src/openai/resources/audio/transcriptions.py

+2-1
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

+2-1
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

+2-1
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

+4-4
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

+2-1
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

+5-7
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

+2-1
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

+6-6
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

+3-6
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

+3-1
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

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

+3-7
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,13 @@
3333
AsyncFileBatchesWithStreamingResponse,
3434
)
3535
from ....pagination import SyncCursorPage, AsyncCursorPage
36-
from ....types.beta import (
37-
VectorStore,
38-
VectorStoreDeleted,
39-
vector_store_list_params,
40-
vector_store_create_params,
41-
vector_store_update_params,
42-
)
36+
from ....types.beta import vector_store_list_params, vector_store_create_params, vector_store_update_params
4337
from ...._base_client import (
4438
AsyncPaginator,
4539
make_request_options,
4640
)
41+
from ....types.beta.vector_store import VectorStore
42+
from ....types.beta.vector_store_deleted import VectorStoreDeleted
4743

4844
__all__ = ["VectorStores", "AsyncVectorStores"]
4945

src/openai/resources/chat/completions.py

+7-9
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import httpx
99

1010
from ... import _legacy_response
11-
from ...types import ChatModel
1211
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
1312
from ..._utils import (
1413
required_args,
@@ -19,17 +18,16 @@
1918
from ..._resource import SyncAPIResource, AsyncAPIResource
2019
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
2120
from ..._streaming import Stream, AsyncStream
22-
from ...types.chat import (
23-
ChatCompletion,
24-
ChatCompletionChunk,
25-
ChatCompletionToolParam,
26-
ChatCompletionMessageParam,
27-
ChatCompletionToolChoiceOptionParam,
28-
completion_create_params,
29-
)
21+
from ...types.chat import completion_create_params
3022
from ..._base_client import (
3123
make_request_options,
3224
)
25+
from ...types.chat_model import ChatModel
26+
from ...types.chat.chat_completion import ChatCompletion
27+
from ...types.chat.chat_completion_chunk import ChatCompletionChunk
28+
from ...types.chat.chat_completion_tool_param import ChatCompletionToolParam
29+
from ...types.chat.chat_completion_message_param import ChatCompletionMessageParam
30+
from ...types.chat.chat_completion_tool_choice_option_param import ChatCompletionToolChoiceOptionParam
3331

3432
__all__ = ["Completions", "AsyncCompletions"]
3533

src/openai/resources/completions.py

+2-1
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 Completion, completion_create_params
11+
from ..types import completion_create_params
1212
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
1313
from .._utils import (
1414
required_args,
@@ -22,6 +22,7 @@
2222
from .._base_client import (
2323
make_request_options,
2424
)
25+
from ..types.completion import Completion
2526

2627
__all__ = ["Completions", "AsyncCompletions"]
2728

src/openai/resources/embeddings.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import httpx
1010

1111
from .. import _legacy_response
12-
from ..types import CreateEmbeddingResponse, embedding_create_params
12+
from ..types import embedding_create_params
1313
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
1414
from .._utils import is_given, maybe_transform
1515
from .._compat import cached_property
@@ -19,6 +19,7 @@
1919
from .._base_client import (
2020
make_request_options,
2121
)
22+
from ..types.create_embedding_response import CreateEmbeddingResponse
2223

2324
__all__ = ["Embeddings", "AsyncEmbeddings"]
2425

src/openai/resources/files.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import httpx
1111

1212
from .. import _legacy_response
13-
from ..types import FileObject, FileDeleted, file_list_params, file_create_params
13+
from ..types import file_list_params, file_create_params
1414
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes
1515
from .._utils import (
1616
extract_files,
@@ -33,6 +33,8 @@
3333
AsyncPaginator,
3434
make_request_options,
3535
)
36+
from ..types.file_object import FileObject
37+
from ..types.file_deleted import FileDeleted
3638

3739
__all__ = ["Files", "AsyncFiles"]
3840

src/openai/resources/fine_tuning/jobs/checkpoints.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
AsyncPaginator,
1616
make_request_options,
1717
)
18-
from ....types.fine_tuning.jobs import FineTuningJobCheckpoint, checkpoint_list_params
18+
from ....types.fine_tuning.jobs import checkpoint_list_params
19+
from ....types.fine_tuning.jobs.fine_tuning_job_checkpoint import FineTuningJobCheckpoint
1920

2021
__all__ = ["Checkpoints", "AsyncCheckpoints"]
2122

src/openai/resources/fine_tuning/jobs/jobs.py

+3-7
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,9 @@
2929
AsyncPaginator,
3030
make_request_options,
3131
)
32-
from ....types.fine_tuning import (
33-
FineTuningJob,
34-
FineTuningJobEvent,
35-
job_list_params,
36-
job_create_params,
37-
job_list_events_params,
38-
)
32+
from ....types.fine_tuning import job_list_params, job_create_params, job_list_events_params
33+
from ....types.fine_tuning.fine_tuning_job import FineTuningJob
34+
from ....types.fine_tuning.fine_tuning_job_event import FineTuningJobEvent
3935

4036
__all__ = ["Jobs", "AsyncJobs"]
4137

src/openai/resources/images.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@
88
import httpx
99

1010
from .. import _legacy_response
11-
from ..types import (
12-
ImagesResponse,
13-
image_edit_params,
14-
image_generate_params,
15-
image_create_variation_params,
16-
)
11+
from ..types import image_edit_params, image_generate_params, image_create_variation_params
1712
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes
1813
from .._utils import (
1914
extract_files,
@@ -27,6 +22,7 @@
2722
from .._base_client import (
2823
make_request_options,
2924
)
25+
from ..types.images_response import ImagesResponse
3026

3127
__all__ = ["Images", "AsyncImages"]
3228

src/openai/resources/models.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@
55
import httpx
66

77
from .. import _legacy_response
8-
from ..types import Model, ModelDeleted
98
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
109
from .._compat import cached_property
1110
from .._resource import SyncAPIResource, AsyncAPIResource
1211
from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
1312
from ..pagination import SyncPage, AsyncPage
13+
from ..types.model import Model
1414
from .._base_client import (
1515
AsyncPaginator,
1616
make_request_options,
1717
)
18+
from ..types.model_deleted import ModelDeleted
1819

1920
__all__ = ["Models", "AsyncModels"]
2021

src/openai/resources/moderations.py

+2-1
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 ModerationCreateResponse, moderation_create_params
11+
from ..types import moderation_create_params
1212
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
1313
from .._utils import (
1414
maybe_transform,
@@ -20,6 +20,7 @@
2020
from .._base_client import (
2121
make_request_options,
2222
)
23+
from ..types.moderation_create_response import ModerationCreateResponse
2324

2425
__all__ = ["Moderations", "AsyncModerations"]
2526

0 commit comments

Comments
 (0)