@@ -4684,6 +4684,17 @@ paths:
4684
4684
schema:
4685
4685
type: string
4686
4686
description: The ID of the thread to run.
4687
+ - name: include
4688
+ in: query
4689
+ description: &include_param_description |
4690
+ A list of additional fields to include in the response. Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content.
4691
+
4692
+ See the [file search tool documentation](/docs/assistants/tools/file-search/customizing-file-search-settings) for more information.
4693
+ schema:
4694
+ type: array
4695
+ items:
4696
+ type: string
4697
+ enum: ["step_details.tool_calls[*].file_search.results[*].content"]
4687
4698
requestBody:
4688
4699
required: true
4689
4700
content:
@@ -5644,6 +5655,14 @@ paths:
5644
5655
description: *pagination_before_param_description
5645
5656
schema:
5646
5657
type: string
5658
+ - name: include
5659
+ in: query
5660
+ description: *include_param_description
5661
+ schema:
5662
+ type: array
5663
+ items:
5664
+ type: string
5665
+ enum: ["step_details.tool_calls[*].file_search.results[*].content"]
5647
5666
responses:
5648
5667
"200":
5649
5668
description: OK
@@ -5655,7 +5674,7 @@ paths:
5655
5674
name: List run steps
5656
5675
group: threads
5657
5676
beta: true
5658
- returns: A list of [run step](/docs/api-reference/runs /step-object) objects.
5677
+ returns: A list of [run step](/docs/api-reference/run-steps /step-object) objects.
5659
5678
examples:
5660
5679
request:
5661
5680
curl: |
@@ -5747,6 +5766,14 @@ paths:
5747
5766
schema:
5748
5767
type: string
5749
5768
description: The ID of the run step to retrieve.
5769
+ - name: include
5770
+ in: query
5771
+ description: *include_param_description
5772
+ schema:
5773
+ type: array
5774
+ items:
5775
+ type: string
5776
+ enum: ["step_details.tool_calls[*].file_search.results[*].content"]
5750
5777
responses:
5751
5778
"200":
5752
5779
description: OK
@@ -5758,7 +5785,7 @@ paths:
5758
5785
name: Retrieve run step
5759
5786
group: threads
5760
5787
beta: true
5761
- returns: The [run step](/docs/api-reference/runs /step-object) object matching the specified ID.
5788
+ returns: The [run step](/docs/api-reference/run-steps /step-object) object matching the specified ID.
5762
5789
examples:
5763
5790
request:
5764
5791
curl: |
@@ -12232,10 +12259,30 @@ components:
12232
12259
description: |
12233
12260
The maximum number of results the file search tool should output. The default is 20 for `gpt-4*` models and 5 for `gpt-3.5-turbo`. This number should be between 1 and 50 inclusive.
12234
12261
12235
- Note that the file search tool may output fewer than `max_num_results` results. See the [file search tool documentation](/docs/assistants/tools/file-search/number-of-chunks-returned) for more information.
12262
+ Note that the file search tool may output fewer than `max_num_results` results. See the [file search tool documentation](/docs/assistants/tools/file-search/customizing-file-search-settings) for more information.
12263
+ ranking_options:
12264
+ $ref: "#/components/schemas/FileSearchRankingOptions"
12236
12265
required:
12237
12266
- type
12238
12267
12268
+ FileSearchRankingOptions:
12269
+ title: File search tool call ranking options
12270
+ type: object
12271
+ description: |
12272
+ The ranking options for the file search.
12273
+
12274
+ See the [file search tool documentation](/docs/assistants/tools/file-search/customizing-file-search-settings) for more information.
12275
+ properties:
12276
+ ranker:
12277
+ type: string
12278
+ description: The ranker to use for the file search. If not specified will use the `auto` ranker.
12279
+ enum: ["auto", "default_2024_08_21"]
12280
+ score_threshold:
12281
+ type: number
12282
+ description: The score threshold for the file search. All values must be a floating point number between 0 and 1.
12283
+ minimum: 0
12284
+ maximum: 1
12285
+
12239
12286
AssistantToolsFileSearchTypeOnly:
12240
12287
type: object
12241
12288
title: FileSearch tool
@@ -14198,11 +14245,72 @@ components:
14198
14245
type: object
14199
14246
description: For now, this is always going to be an empty object.
14200
14247
x-oaiTypeLabel: map
14248
+ properties:
14249
+ ranking_options:
14250
+ $ref: "#/components/schemas/RunStepDetailsToolCallsFileSearchRankingOptionsObject"
14251
+ results:
14252
+ type: array
14253
+ description: The results of the file search.
14254
+ items:
14255
+ $ref: "#/components/schemas/RunStepDetailsToolCallsFileSearchResultObject"
14201
14256
required:
14202
14257
- id
14203
14258
- type
14204
14259
- file_search
14205
14260
14261
+ RunStepDetailsToolCallsFileSearchRankingOptionsObject:
14262
+ title: File search tool call ranking options
14263
+ type: object
14264
+ description: The ranking options for the file search.
14265
+ properties:
14266
+ ranker:
14267
+ type: string
14268
+ description: The ranker used for the file search.
14269
+ enum: ["default_2024_08_21"]
14270
+ score_threshold:
14271
+ type: number
14272
+ description: The score threshold for the file search. All values must be a floating point number between 0 and 1.
14273
+ minimum: 0
14274
+ maximum: 1
14275
+ required:
14276
+ - ranker
14277
+ - score_threshold
14278
+
14279
+ RunStepDetailsToolCallsFileSearchResultObject:
14280
+ title: File search tool call result
14281
+ type: object
14282
+ description: A result instance of the file search.
14283
+ x-oaiTypeLabel: map
14284
+ properties:
14285
+ file_id:
14286
+ type: string
14287
+ description: The ID of the file that result was found in.
14288
+ file_name:
14289
+ type: string
14290
+ description: The name of the file that result was found in.
14291
+ score:
14292
+ type: number
14293
+ description: The score of the result. All values must be a floating point number between 0 and 1.
14294
+ minimum: 0
14295
+ maximum: 1
14296
+ content:
14297
+ type: array
14298
+ description: The content of the result that was found. The content is only included if requested via the include query parameter.
14299
+ items:
14300
+ type: object
14301
+ properties:
14302
+ type:
14303
+ type: string
14304
+ description: The type of the content.
14305
+ enum: ["text"]
14306
+ text:
14307
+ type: string
14308
+ description: The text content of the file.
14309
+ required:
14310
+ - file_id
14311
+ - file_name
14312
+ - score
14313
+
14206
14314
RunStepDeltaStepDetailsToolCallsFileSearchObject:
14207
14315
title: File search tool call
14208
14316
type: object
@@ -14989,9 +15097,9 @@ components:
14989
15097
required:
14990
15098
- event
14991
15099
- data
14992
- description: Occurs when a [run step](/docs/api-reference/runs /step-object) is created.
15100
+ description: Occurs when a [run step](/docs/api-reference/run-steps /step-object) is created.
14993
15101
x-oaiMeta:
14994
- dataDescription: "`data` is a [run step](/docs/api-reference/runs /step-object)"
15102
+ dataDescription: "`data` is a [run step](/docs/api-reference/run-steps /step-object)"
14995
15103
- type: object
14996
15104
properties:
14997
15105
event:
@@ -15002,9 +15110,9 @@ components:
15002
15110
required:
15003
15111
- event
15004
15112
- data
15005
- description: Occurs when a [run step](/docs/api-reference/runs /step-object) moves to an `in_progress` state.
15113
+ description: Occurs when a [run step](/docs/api-reference/run-steps /step-object) moves to an `in_progress` state.
15006
15114
x-oaiMeta:
15007
- dataDescription: "`data` is a [run step](/docs/api-reference/runs /step-object)"
15115
+ dataDescription: "`data` is a [run step](/docs/api-reference/run-steps /step-object)"
15008
15116
- type: object
15009
15117
properties:
15010
15118
event:
@@ -15015,7 +15123,7 @@ components:
15015
15123
required:
15016
15124
- event
15017
15125
- data
15018
- description: Occurs when parts of a [run step](/docs/api-reference/runs /step-object) are being streamed.
15126
+ description: Occurs when parts of a [run step](/docs/api-reference/run-steps /step-object) are being streamed.
15019
15127
x-oaiMeta:
15020
15128
dataDescription: "`data` is a [run step delta](/docs/api-reference/assistants-streaming/run-step-delta-object)"
15021
15129
- type: object
@@ -15028,9 +15136,9 @@ components:
15028
15136
required:
15029
15137
- event
15030
15138
- data
15031
- description: Occurs when a [run step](/docs/api-reference/runs /step-object) is completed.
15139
+ description: Occurs when a [run step](/docs/api-reference/run-steps /step-object) is completed.
15032
15140
x-oaiMeta:
15033
- dataDescription: "`data` is a [run step](/docs/api-reference/runs /step-object)"
15141
+ dataDescription: "`data` is a [run step](/docs/api-reference/run-steps /step-object)"
15034
15142
- type: object
15035
15143
properties:
15036
15144
event:
@@ -15041,9 +15149,9 @@ components:
15041
15149
required:
15042
15150
- event
15043
15151
- data
15044
- description: Occurs when a [run step](/docs/api-reference/runs /step-object) fails.
15152
+ description: Occurs when a [run step](/docs/api-reference/run-steps /step-object) fails.
15045
15153
x-oaiMeta:
15046
- dataDescription: "`data` is a [run step](/docs/api-reference/runs /step-object)"
15154
+ dataDescription: "`data` is a [run step](/docs/api-reference/run-steps /step-object)"
15047
15155
- type: object
15048
15156
properties:
15049
15157
event:
@@ -15054,9 +15162,9 @@ components:
15054
15162
required:
15055
15163
- event
15056
15164
- data
15057
- description: Occurs when a [run step](/docs/api-reference/runs /step-object) is cancelled.
15165
+ description: Occurs when a [run step](/docs/api-reference/run-steps /step-object) is cancelled.
15058
15166
x-oaiMeta:
15059
- dataDescription: "`data` is a [run step](/docs/api-reference/runs /step-object)"
15167
+ dataDescription: "`data` is a [run step](/docs/api-reference/run-steps /step-object)"
15060
15168
- type: object
15061
15169
properties:
15062
15170
event:
@@ -15067,9 +15175,9 @@ components:
15067
15175
required:
15068
15176
- event
15069
15177
- data
15070
- description: Occurs when a [run step](/docs/api-reference/runs /step-object) expires.
15178
+ description: Occurs when a [run step](/docs/api-reference/run-steps /step-object) expires.
15071
15179
x-oaiMeta:
15072
- dataDescription: "`data` is a [run step](/docs/api-reference/runs /step-object)"
15180
+ dataDescription: "`data` is a [run step](/docs/api-reference/run-steps /step-object)"
15073
15181
15074
15182
MessageStreamEvent:
15075
15183
oneOf:
0 commit comments