Skip to content

Commit 4ebfd51

Browse files
feat(api): Updating Assistants and Evals API schemas
1 parent d776534 commit 4ebfd51

Some content is hidden

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

51 files changed

+1621
-708
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 101
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-161ca7f1cfd7b33c1fc07d0ce25dfe4be5a7271c394f4cb526b7fb21b0729900.yml
3-
openapi_spec_hash: 602e14add4bee018c6774e320ce309b8
4-
config_hash: bdacc55eb995c15255ec82130eb8c3bb
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-5fa16b9a02985ae06e41be14946a9c325dc672fb014b3c19abca65880c6990e6.yml
3+
openapi_spec_hash: da3e669f65130043b1170048c0727890
4+
config_hash: d8d5fda350f6db77c784f35429741a2e

api.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ from openai.types import (
77
ComparisonFilter,
88
CompoundFilter,
99
ErrorObject,
10-
EvalItem,
1110
FunctionDefinition,
1211
FunctionParameters,
1312
Metadata,
@@ -344,7 +343,6 @@ from openai.types import (
344343
StaticFileChunkingStrategyObjectParam,
345344
VectorStore,
346345
VectorStoreDeleted,
347-
VectorStoreExpirationAfter,
348346
VectorStoreSearchResponse,
349347
)
350348
```
@@ -521,7 +519,6 @@ from openai.types.beta import (
521519
AssistantToolChoiceOption,
522520
Thread,
523521
ThreadDeleted,
524-
TruncationObject,
525522
)
526523
```
527524

@@ -790,7 +787,6 @@ Types:
790787
```python
791788
from openai.types import (
792789
EvalCustomDataSourceConfig,
793-
EvalLogsDataSourceConfig,
794790
EvalStoredCompletionsDataSourceConfig,
795791
EvalCreateResponse,
796792
EvalRetrieveResponse,
@@ -816,10 +812,7 @@ Types:
816812
from openai.types.evals import (
817813
CreateEvalCompletionsRunDataSource,
818814
CreateEvalJSONLRunDataSource,
819-
CreateEvalResponsesRunDataSource,
820815
EvalAPIError,
821-
EvalJSONLFileContentSource,
822-
EvalJSONLFileIDSource,
823816
RunCreateResponse,
824817
RunRetrieveResponse,
825818
RunListResponse,

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

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
from .....types.shared.reasoning_effort import ReasoningEffort
5252
from .....types.beta.assistant_tool_param import AssistantToolParam
5353
from .....types.beta.assistant_stream_event import AssistantStreamEvent
54-
from .....types.beta.truncation_object_param import TruncationObjectParam
5554
from .....types.beta.threads.runs.run_step_include import RunStepInclude
5655
from .....types.beta.assistant_tool_choice_option_param import AssistantToolChoiceOptionParam
5756
from .....types.beta.assistant_response_format_option_param import AssistantResponseFormatOptionParam
@@ -105,7 +104,7 @@ def create(
105104
tool_choice: Optional[AssistantToolChoiceOptionParam] | NotGiven = NOT_GIVEN,
106105
tools: Optional[Iterable[AssistantToolParam]] | NotGiven = NOT_GIVEN,
107106
top_p: Optional[float] | NotGiven = NOT_GIVEN,
108-
truncation_strategy: Optional[TruncationObjectParam] | NotGiven = NOT_GIVEN,
107+
truncation_strategy: Optional[run_create_params.TruncationStrategy] | NotGiven = NOT_GIVEN,
109108
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
110109
# The extra values given here take precedence over values defined on the client or passed to this method.
111110
extra_headers: Headers | None = None,
@@ -255,7 +254,7 @@ def create(
255254
tool_choice: Optional[AssistantToolChoiceOptionParam] | NotGiven = NOT_GIVEN,
256255
tools: Optional[Iterable[AssistantToolParam]] | NotGiven = NOT_GIVEN,
257256
top_p: Optional[float] | NotGiven = NOT_GIVEN,
258-
truncation_strategy: Optional[TruncationObjectParam] | NotGiven = NOT_GIVEN,
257+
truncation_strategy: Optional[run_create_params.TruncationStrategy] | NotGiven = NOT_GIVEN,
259258
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
260259
# The extra values given here take precedence over values defined on the client or passed to this method.
261260
extra_headers: Headers | None = None,
@@ -405,7 +404,7 @@ def create(
405404
tool_choice: Optional[AssistantToolChoiceOptionParam] | NotGiven = NOT_GIVEN,
406405
tools: Optional[Iterable[AssistantToolParam]] | NotGiven = NOT_GIVEN,
407406
top_p: Optional[float] | NotGiven = NOT_GIVEN,
408-
truncation_strategy: Optional[TruncationObjectParam] | NotGiven = NOT_GIVEN,
407+
truncation_strategy: Optional[run_create_params.TruncationStrategy] | NotGiven = NOT_GIVEN,
409408
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
410409
# The extra values given here take precedence over values defined on the client or passed to this method.
411410
extra_headers: Headers | None = None,
@@ -555,7 +554,7 @@ def create(
555554
tool_choice: Optional[AssistantToolChoiceOptionParam] | NotGiven = NOT_GIVEN,
556555
tools: Optional[Iterable[AssistantToolParam]] | NotGiven = NOT_GIVEN,
557556
top_p: Optional[float] | NotGiven = NOT_GIVEN,
558-
truncation_strategy: Optional[TruncationObjectParam] | NotGiven = NOT_GIVEN,
557+
truncation_strategy: Optional[run_create_params.TruncationStrategy] | NotGiven = NOT_GIVEN,
559558
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
560559
# The extra values given here take precedence over values defined on the client or passed to this method.
561560
extra_headers: Headers | None = None,
@@ -1516,7 +1515,7 @@ async def create(
15161515
tool_choice: Optional[AssistantToolChoiceOptionParam] | NotGiven = NOT_GIVEN,
15171516
tools: Optional[Iterable[AssistantToolParam]] | NotGiven = NOT_GIVEN,
15181517
top_p: Optional[float] | NotGiven = NOT_GIVEN,
1519-
truncation_strategy: Optional[TruncationObjectParam] | NotGiven = NOT_GIVEN,
1518+
truncation_strategy: Optional[run_create_params.TruncationStrategy] | NotGiven = NOT_GIVEN,
15201519
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
15211520
# The extra values given here take precedence over values defined on the client or passed to this method.
15221521
extra_headers: Headers | None = None,
@@ -1666,7 +1665,7 @@ async def create(
16661665
tool_choice: Optional[AssistantToolChoiceOptionParam] | NotGiven = NOT_GIVEN,
16671666
tools: Optional[Iterable[AssistantToolParam]] | NotGiven = NOT_GIVEN,
16681667
top_p: Optional[float] | NotGiven = NOT_GIVEN,
1669-
truncation_strategy: Optional[TruncationObjectParam] | NotGiven = NOT_GIVEN,
1668+
truncation_strategy: Optional[run_create_params.TruncationStrategy] | NotGiven = NOT_GIVEN,
16701669
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
16711670
# The extra values given here take precedence over values defined on the client or passed to this method.
16721671
extra_headers: Headers | None = None,
@@ -1816,7 +1815,7 @@ async def create(
18161815
tool_choice: Optional[AssistantToolChoiceOptionParam] | NotGiven = NOT_GIVEN,
18171816
tools: Optional[Iterable[AssistantToolParam]] | NotGiven = NOT_GIVEN,
18181817
top_p: Optional[float] | NotGiven = NOT_GIVEN,
1819-
truncation_strategy: Optional[TruncationObjectParam] | NotGiven = NOT_GIVEN,
1818+
truncation_strategy: Optional[run_create_params.TruncationStrategy] | NotGiven = NOT_GIVEN,
18201819
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
18211820
# The extra values given here take precedence over values defined on the client or passed to this method.
18221821
extra_headers: Headers | None = None,
@@ -1966,7 +1965,7 @@ async def create(
19661965
tool_choice: Optional[AssistantToolChoiceOptionParam] | NotGiven = NOT_GIVEN,
19671966
tools: Optional[Iterable[AssistantToolParam]] | NotGiven = NOT_GIVEN,
19681967
top_p: Optional[float] | NotGiven = NOT_GIVEN,
1969-
truncation_strategy: Optional[TruncationObjectParam] | NotGiven = NOT_GIVEN,
1968+
truncation_strategy: Optional[run_create_params.TruncationStrategy] | NotGiven = NOT_GIVEN,
19701969
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
19711970
# The extra values given here take precedence over values defined on the client or passed to this method.
19721971
extra_headers: Headers | None = None,

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

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
from ....types.shared_params.metadata import Metadata
5353
from ....types.beta.assistant_tool_param import AssistantToolParam
5454
from ....types.beta.assistant_stream_event import AssistantStreamEvent
55-
from ....types.beta.truncation_object_param import TruncationObjectParam
5655
from ....types.beta.assistant_tool_choice_option_param import AssistantToolChoiceOptionParam
5756
from ....types.beta.assistant_response_format_option_param import AssistantResponseFormatOptionParam
5857

@@ -286,7 +285,7 @@ def create_and_run(
286285
tool_resources: Optional[thread_create_and_run_params.ToolResources] | NotGiven = NOT_GIVEN,
287286
tools: Optional[Iterable[AssistantToolParam]] | NotGiven = NOT_GIVEN,
288287
top_p: Optional[float] | NotGiven = NOT_GIVEN,
289-
truncation_strategy: Optional[TruncationObjectParam] | NotGiven = NOT_GIVEN,
288+
truncation_strategy: Optional[thread_create_and_run_params.TruncationStrategy] | NotGiven = NOT_GIVEN,
290289
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
291290
# The extra values given here take precedence over values defined on the client or passed to this method.
292291
extra_headers: Headers | None = None,
@@ -419,7 +418,7 @@ def create_and_run(
419418
tool_resources: Optional[thread_create_and_run_params.ToolResources] | NotGiven = NOT_GIVEN,
420419
tools: Optional[Iterable[AssistantToolParam]] | NotGiven = NOT_GIVEN,
421420
top_p: Optional[float] | NotGiven = NOT_GIVEN,
422-
truncation_strategy: Optional[TruncationObjectParam] | NotGiven = NOT_GIVEN,
421+
truncation_strategy: Optional[thread_create_and_run_params.TruncationStrategy] | NotGiven = NOT_GIVEN,
423422
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
424423
# The extra values given here take precedence over values defined on the client or passed to this method.
425424
extra_headers: Headers | None = None,
@@ -552,7 +551,7 @@ def create_and_run(
552551
tool_resources: Optional[thread_create_and_run_params.ToolResources] | NotGiven = NOT_GIVEN,
553552
tools: Optional[Iterable[AssistantToolParam]] | NotGiven = NOT_GIVEN,
554553
top_p: Optional[float] | NotGiven = NOT_GIVEN,
555-
truncation_strategy: Optional[TruncationObjectParam] | NotGiven = NOT_GIVEN,
554+
truncation_strategy: Optional[thread_create_and_run_params.TruncationStrategy] | NotGiven = NOT_GIVEN,
556555
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
557556
# The extra values given here take precedence over values defined on the client or passed to this method.
558557
extra_headers: Headers | None = None,
@@ -685,7 +684,7 @@ def create_and_run(
685684
tool_resources: Optional[thread_create_and_run_params.ToolResources] | NotGiven = NOT_GIVEN,
686685
tools: Optional[Iterable[AssistantToolParam]] | NotGiven = NOT_GIVEN,
687686
top_p: Optional[float] | NotGiven = NOT_GIVEN,
688-
truncation_strategy: Optional[TruncationObjectParam] | NotGiven = NOT_GIVEN,
687+
truncation_strategy: Optional[thread_create_and_run_params.TruncationStrategy] | NotGiven = NOT_GIVEN,
689688
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
690689
# The extra values given here take precedence over values defined on the client or passed to this method.
691690
extra_headers: Headers | None = None,
@@ -1135,7 +1134,7 @@ async def create_and_run(
11351134
tool_resources: Optional[thread_create_and_run_params.ToolResources] | NotGiven = NOT_GIVEN,
11361135
tools: Optional[Iterable[AssistantToolParam]] | NotGiven = NOT_GIVEN,
11371136
top_p: Optional[float] | NotGiven = NOT_GIVEN,
1138-
truncation_strategy: Optional[TruncationObjectParam] | NotGiven = NOT_GIVEN,
1137+
truncation_strategy: Optional[thread_create_and_run_params.TruncationStrategy] | NotGiven = NOT_GIVEN,
11391138
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
11401139
# The extra values given here take precedence over values defined on the client or passed to this method.
11411140
extra_headers: Headers | None = None,
@@ -1268,7 +1267,7 @@ async def create_and_run(
12681267
tool_resources: Optional[thread_create_and_run_params.ToolResources] | NotGiven = NOT_GIVEN,
12691268
tools: Optional[Iterable[AssistantToolParam]] | NotGiven = NOT_GIVEN,
12701269
top_p: Optional[float] | NotGiven = NOT_GIVEN,
1271-
truncation_strategy: Optional[TruncationObjectParam] | NotGiven = NOT_GIVEN,
1270+
truncation_strategy: Optional[thread_create_and_run_params.TruncationStrategy] | NotGiven = NOT_GIVEN,
12721271
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
12731272
# The extra values given here take precedence over values defined on the client or passed to this method.
12741273
extra_headers: Headers | None = None,
@@ -1401,7 +1400,7 @@ async def create_and_run(
14011400
tool_resources: Optional[thread_create_and_run_params.ToolResources] | NotGiven = NOT_GIVEN,
14021401
tools: Optional[Iterable[AssistantToolParam]] | NotGiven = NOT_GIVEN,
14031402
top_p: Optional[float] | NotGiven = NOT_GIVEN,
1404-
truncation_strategy: Optional[TruncationObjectParam] | NotGiven = NOT_GIVEN,
1403+
truncation_strategy: Optional[thread_create_and_run_params.TruncationStrategy] | NotGiven = NOT_GIVEN,
14051404
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
14061405
# The extra values given here take precedence over values defined on the client or passed to this method.
14071406
extra_headers: Headers | None = None,
@@ -1534,7 +1533,7 @@ async def create_and_run(
15341533
tool_resources: Optional[thread_create_and_run_params.ToolResources] | NotGiven = NOT_GIVEN,
15351534
tools: Optional[Iterable[AssistantToolParam]] | NotGiven = NOT_GIVEN,
15361535
top_p: Optional[float] | NotGiven = NOT_GIVEN,
1537-
truncation_strategy: Optional[TruncationObjectParam] | NotGiven = NOT_GIVEN,
1536+
truncation_strategy: Optional[thread_create_and_run_params.TruncationStrategy] | NotGiven = NOT_GIVEN,
15381537
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
15391538
# The extra values given here take precedence over values defined on the client or passed to this method.
15401539
extra_headers: Headers | None = None,

src/openai/resources/vector_stores/vector_stores.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
from ...types.shared_params.metadata import Metadata
4444
from ...types.file_chunking_strategy_param import FileChunkingStrategyParam
4545
from ...types.vector_store_search_response import VectorStoreSearchResponse
46-
from ...types.vector_store_expiration_after_param import VectorStoreExpirationAfterParam
4746

4847
__all__ = ["VectorStores", "AsyncVectorStores"]
4948

@@ -80,7 +79,7 @@ def create(
8079
self,
8180
*,
8281
chunking_strategy: FileChunkingStrategyParam | NotGiven = NOT_GIVEN,
83-
expires_after: VectorStoreExpirationAfterParam | NotGiven = NOT_GIVEN,
82+
expires_after: vector_store_create_params.ExpiresAfter | NotGiven = NOT_GIVEN,
8483
file_ids: List[str] | NotGiven = NOT_GIVEN,
8584
metadata: Optional[Metadata] | NotGiven = NOT_GIVEN,
8685
name: str | NotGiven = NOT_GIVEN,
@@ -178,7 +177,7 @@ def update(
178177
self,
179178
vector_store_id: str,
180179
*,
181-
expires_after: Optional[VectorStoreExpirationAfterParam] | NotGiven = NOT_GIVEN,
180+
expires_after: Optional[vector_store_update_params.ExpiresAfter] | NotGiven = NOT_GIVEN,
182181
metadata: Optional[Metadata] | NotGiven = NOT_GIVEN,
183182
name: Optional[str] | NotGiven = NOT_GIVEN,
184183
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -425,7 +424,7 @@ async def create(
425424
self,
426425
*,
427426
chunking_strategy: FileChunkingStrategyParam | NotGiven = NOT_GIVEN,
428-
expires_after: VectorStoreExpirationAfterParam | NotGiven = NOT_GIVEN,
427+
expires_after: vector_store_create_params.ExpiresAfter | NotGiven = NOT_GIVEN,
429428
file_ids: List[str] | NotGiven = NOT_GIVEN,
430429
metadata: Optional[Metadata] | NotGiven = NOT_GIVEN,
431430
name: str | NotGiven = NOT_GIVEN,
@@ -523,7 +522,7 @@ async def update(
523522
self,
524523
vector_store_id: str,
525524
*,
526-
expires_after: Optional[VectorStoreExpirationAfterParam] | NotGiven = NOT_GIVEN,
525+
expires_after: Optional[vector_store_update_params.ExpiresAfter] | NotGiven = NOT_GIVEN,
527526
metadata: Optional[Metadata] | NotGiven = NOT_GIVEN,
528527
name: Optional[str] | NotGiven = NOT_GIVEN,
529528
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.

src/openai/types/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from .image import Image as Image
77
from .model import Model as Model
88
from .shared import (
9-
EvalItem as EvalItem,
109
Metadata as Metadata,
1110
AllModels as AllModels,
1211
ChatModel as ChatModel,
@@ -71,20 +70,17 @@
7170
from .vector_store_search_params import VectorStoreSearchParams as VectorStoreSearchParams
7271
from .vector_store_update_params import VectorStoreUpdateParams as VectorStoreUpdateParams
7372
from .moderation_text_input_param import ModerationTextInputParam as ModerationTextInputParam
74-
from .eval_logs_data_source_config import EvalLogsDataSourceConfig as EvalLogsDataSourceConfig
7573
from .file_chunking_strategy_param import FileChunkingStrategyParam as FileChunkingStrategyParam
7674
from .vector_store_search_response import VectorStoreSearchResponse as VectorStoreSearchResponse
7775
from .websocket_connection_options import WebsocketConnectionOptions as WebsocketConnectionOptions
7876
from .image_create_variation_params import ImageCreateVariationParams as ImageCreateVariationParams
7977
from .static_file_chunking_strategy import StaticFileChunkingStrategy as StaticFileChunkingStrategy
80-
from .vector_store_expiration_after import VectorStoreExpirationAfter as VectorStoreExpirationAfter
8178
from .eval_custom_data_source_config import EvalCustomDataSourceConfig as EvalCustomDataSourceConfig
8279
from .moderation_image_url_input_param import ModerationImageURLInputParam as ModerationImageURLInputParam
8380
from .auto_file_chunking_strategy_param import AutoFileChunkingStrategyParam as AutoFileChunkingStrategyParam
8481
from .moderation_multi_modal_input_param import ModerationMultiModalInputParam as ModerationMultiModalInputParam
8582
from .other_file_chunking_strategy_object import OtherFileChunkingStrategyObject as OtherFileChunkingStrategyObject
8683
from .static_file_chunking_strategy_param import StaticFileChunkingStrategyParam as StaticFileChunkingStrategyParam
87-
from .vector_store_expiration_after_param import VectorStoreExpirationAfterParam as VectorStoreExpirationAfterParam
8884
from .static_file_chunking_strategy_object import StaticFileChunkingStrategyObject as StaticFileChunkingStrategyObject
8985
from .eval_stored_completions_data_source_config import (
9086
EvalStoredCompletionsDataSourceConfig as EvalStoredCompletionsDataSourceConfig,

src/openai/types/beta/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from .thread_deleted import ThreadDeleted as ThreadDeleted
1010
from .file_search_tool import FileSearchTool as FileSearchTool
1111
from .assistant_deleted import AssistantDeleted as AssistantDeleted
12-
from .truncation_object import TruncationObject as TruncationObject
1312
from .function_tool_param import FunctionToolParam as FunctionToolParam
1413
from .assistant_tool_param import AssistantToolParam as AssistantToolParam
1514
from .thread_create_params import ThreadCreateParams as ThreadCreateParams
@@ -21,7 +20,6 @@
2120
from .file_search_tool_param import FileSearchToolParam as FileSearchToolParam
2221
from .assistant_create_params import AssistantCreateParams as AssistantCreateParams
2322
from .assistant_update_params import AssistantUpdateParams as AssistantUpdateParams
24-
from .truncation_object_param import TruncationObjectParam as TruncationObjectParam
2523
from .assistant_tool_choice_param import AssistantToolChoiceParam as AssistantToolChoiceParam
2624
from .code_interpreter_tool_param import CodeInterpreterToolParam as CodeInterpreterToolParam
2725
from .assistant_tool_choice_option import AssistantToolChoiceOption as AssistantToolChoiceOption

0 commit comments

Comments
 (0)