Skip to content

Commit 45c5856

Browse files
feat(api): add web search filters
1 parent 201f54e commit 45c5856

21 files changed

+1867
-138
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 119
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-ddbdf9343316047e8a773c54fb24e4a8d225955e202a1888fde6f9c8898ebf98.yml
3-
openapi_spec_hash: 9802f6dd381558466c897f6e387e06ca
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-8517ffa1004e31ca2523d617629e64be6fe4f13403ddfd9db5b3be002656cbde.yml
3+
openapi_spec_hash: b64dd8c8b23082a7aa2a3e5c5fffd8bd
44
config_hash: fe0ea26680ac2075a6cd66416aefe7db

openai-java-core/src/main/kotlin/com/openai/models/conversations/ConversationCreateParams.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import java.util.Objects
3232
import java.util.Optional
3333
import kotlin.jvm.optionals.getOrNull
3434

35-
/** Create a conversation with the given ID. */
35+
/** Create a conversation. */
3636
class ConversationCreateParams
3737
private constructor(
3838
private val body: Body,

openai-java-core/src/main/kotlin/com/openai/models/conversations/items/ItemListParams.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ private constructor(
3535
/**
3636
* Specify additional output data to include in the model response. Currently supported values
3737
* are:
38+
* - `web_search_call.action.sources`: Include the sources of the web search tool call.
3839
* - `code_interpreter_call.outputs`: Includes the outputs of python code execution in code
3940
* interpreter tool call items.
4041
* - `computer_call_output.output.image_url`: Include image urls from the computer call output.
@@ -114,6 +115,7 @@ private constructor(
114115
/**
115116
* Specify additional output data to include in the model response. Currently supported
116117
* values are:
118+
* - `web_search_call.action.sources`: Include the sources of the web search tool call.
117119
* - `code_interpreter_call.outputs`: Includes the outputs of python code execution in code
118120
* interpreter tool call items.
119121
* - `computer_call_output.output.image_url`: Include image urls from the computer call

openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunCancelResponse.kt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6208,16 +6208,17 @@ private constructor(
62086208
fun addFileSearchTool(vectorStoreIds: List<String>) =
62096209
addTool(FileSearchTool.builder().vectorStoreIds(vectorStoreIds).build())
62106210

6211-
/** Alias for calling [addTool] with `Tool.ofWebSearch(webSearch)`. */
6212-
fun addTool(webSearch: WebSearchTool) = addTool(Tool.ofWebSearch(webSearch))
6213-
62146211
/**
62156212
* Alias for calling [addTool] with
62166213
* `Tool.ofComputerUsePreview(computerUsePreview)`.
62176214
*/
62186215
fun addTool(computerUsePreview: ComputerTool) =
62196216
addTool(Tool.ofComputerUsePreview(computerUsePreview))
62206217

6218+
/** Alias for calling [addTool] with `Tool.ofWebSearchTool(webSearchTool)`. */
6219+
fun addTool(webSearchTool: Tool.WebSearchTool) =
6220+
addTool(Tool.ofWebSearchTool(webSearchTool))
6221+
62216222
/** Alias for calling [addTool] with `Tool.ofMcp(mcp)`. */
62226223
fun addTool(mcp: Tool.Mcp) = addTool(Tool.ofMcp(mcp))
62236224

@@ -6293,6 +6294,10 @@ private constructor(
62936294
fun addCustomTool(name: String) =
62946295
addTool(CustomTool.builder().name(name).build())
62956296

6297+
/** Alias for calling [addTool] with `Tool.ofWebSearchTool(webSearchTool)`. */
6298+
fun addTool(webSearchTool: WebSearchTool) =
6299+
addTool(Tool.ofWebSearchTool(webSearchTool))
6300+
62966301
/**
62976302
* An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
62986303
*/

openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunCreateParams.kt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6093,16 +6093,17 @@ private constructor(
60936093
fun addFileSearchTool(vectorStoreIds: List<String>) =
60946094
addTool(FileSearchTool.builder().vectorStoreIds(vectorStoreIds).build())
60956095

6096-
/** Alias for calling [addTool] with `Tool.ofWebSearch(webSearch)`. */
6097-
fun addTool(webSearch: WebSearchTool) = addTool(Tool.ofWebSearch(webSearch))
6098-
60996096
/**
61006097
* Alias for calling [addTool] with
61016098
* `Tool.ofComputerUsePreview(computerUsePreview)`.
61026099
*/
61036100
fun addTool(computerUsePreview: ComputerTool) =
61046101
addTool(Tool.ofComputerUsePreview(computerUsePreview))
61056102

6103+
/** Alias for calling [addTool] with `Tool.ofWebSearchTool(webSearchTool)`. */
6104+
fun addTool(webSearchTool: Tool.WebSearchTool) =
6105+
addTool(Tool.ofWebSearchTool(webSearchTool))
6106+
61066107
/** Alias for calling [addTool] with `Tool.ofMcp(mcp)`. */
61076108
fun addTool(mcp: Tool.Mcp) = addTool(Tool.ofMcp(mcp))
61086109

@@ -6178,6 +6179,10 @@ private constructor(
61786179
fun addCustomTool(name: String) =
61796180
addTool(CustomTool.builder().name(name).build())
61806181

6182+
/** Alias for calling [addTool] with `Tool.ofWebSearchTool(webSearchTool)`. */
6183+
fun addTool(webSearchTool: WebSearchTool) =
6184+
addTool(Tool.ofWebSearchTool(webSearchTool))
6185+
61816186
/**
61826187
* An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
61836188
*/

openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunCreateResponse.kt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6208,16 +6208,17 @@ private constructor(
62086208
fun addFileSearchTool(vectorStoreIds: List<String>) =
62096209
addTool(FileSearchTool.builder().vectorStoreIds(vectorStoreIds).build())
62106210

6211-
/** Alias for calling [addTool] with `Tool.ofWebSearch(webSearch)`. */
6212-
fun addTool(webSearch: WebSearchTool) = addTool(Tool.ofWebSearch(webSearch))
6213-
62146211
/**
62156212
* Alias for calling [addTool] with
62166213
* `Tool.ofComputerUsePreview(computerUsePreview)`.
62176214
*/
62186215
fun addTool(computerUsePreview: ComputerTool) =
62196216
addTool(Tool.ofComputerUsePreview(computerUsePreview))
62206217

6218+
/** Alias for calling [addTool] with `Tool.ofWebSearchTool(webSearchTool)`. */
6219+
fun addTool(webSearchTool: Tool.WebSearchTool) =
6220+
addTool(Tool.ofWebSearchTool(webSearchTool))
6221+
62216222
/** Alias for calling [addTool] with `Tool.ofMcp(mcp)`. */
62226223
fun addTool(mcp: Tool.Mcp) = addTool(Tool.ofMcp(mcp))
62236224

@@ -6293,6 +6294,10 @@ private constructor(
62936294
fun addCustomTool(name: String) =
62946295
addTool(CustomTool.builder().name(name).build())
62956296

6297+
/** Alias for calling [addTool] with `Tool.ofWebSearchTool(webSearchTool)`. */
6298+
fun addTool(webSearchTool: WebSearchTool) =
6299+
addTool(Tool.ofWebSearchTool(webSearchTool))
6300+
62966301
/**
62976302
* An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
62986303
*/

openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunListResponse.kt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6208,16 +6208,17 @@ private constructor(
62086208
fun addFileSearchTool(vectorStoreIds: List<String>) =
62096209
addTool(FileSearchTool.builder().vectorStoreIds(vectorStoreIds).build())
62106210

6211-
/** Alias for calling [addTool] with `Tool.ofWebSearch(webSearch)`. */
6212-
fun addTool(webSearch: WebSearchTool) = addTool(Tool.ofWebSearch(webSearch))
6213-
62146211
/**
62156212
* Alias for calling [addTool] with
62166213
* `Tool.ofComputerUsePreview(computerUsePreview)`.
62176214
*/
62186215
fun addTool(computerUsePreview: ComputerTool) =
62196216
addTool(Tool.ofComputerUsePreview(computerUsePreview))
62206217

6218+
/** Alias for calling [addTool] with `Tool.ofWebSearchTool(webSearchTool)`. */
6219+
fun addTool(webSearchTool: Tool.WebSearchTool) =
6220+
addTool(Tool.ofWebSearchTool(webSearchTool))
6221+
62216222
/** Alias for calling [addTool] with `Tool.ofMcp(mcp)`. */
62226223
fun addTool(mcp: Tool.Mcp) = addTool(Tool.ofMcp(mcp))
62236224

@@ -6293,6 +6294,10 @@ private constructor(
62936294
fun addCustomTool(name: String) =
62946295
addTool(CustomTool.builder().name(name).build())
62956296

6297+
/** Alias for calling [addTool] with `Tool.ofWebSearchTool(webSearchTool)`. */
6298+
fun addTool(webSearchTool: WebSearchTool) =
6299+
addTool(Tool.ofWebSearchTool(webSearchTool))
6300+
62966301
/**
62976302
* An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
62986303
*/

openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunRetrieveResponse.kt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6208,16 +6208,17 @@ private constructor(
62086208
fun addFileSearchTool(vectorStoreIds: List<String>) =
62096209
addTool(FileSearchTool.builder().vectorStoreIds(vectorStoreIds).build())
62106210

6211-
/** Alias for calling [addTool] with `Tool.ofWebSearch(webSearch)`. */
6212-
fun addTool(webSearch: WebSearchTool) = addTool(Tool.ofWebSearch(webSearch))
6213-
62146211
/**
62156212
* Alias for calling [addTool] with
62166213
* `Tool.ofComputerUsePreview(computerUsePreview)`.
62176214
*/
62186215
fun addTool(computerUsePreview: ComputerTool) =
62196216
addTool(Tool.ofComputerUsePreview(computerUsePreview))
62206217

6218+
/** Alias for calling [addTool] with `Tool.ofWebSearchTool(webSearchTool)`. */
6219+
fun addTool(webSearchTool: Tool.WebSearchTool) =
6220+
addTool(Tool.ofWebSearchTool(webSearchTool))
6221+
62216222
/** Alias for calling [addTool] with `Tool.ofMcp(mcp)`. */
62226223
fun addTool(mcp: Tool.Mcp) = addTool(Tool.ofMcp(mcp))
62236224

@@ -6293,6 +6294,10 @@ private constructor(
62936294
fun addCustomTool(name: String) =
62946295
addTool(CustomTool.builder().name(name).build())
62956296

6297+
/** Alias for calling [addTool] with `Tool.ofWebSearchTool(webSearchTool)`. */
6298+
fun addTool(webSearchTool: WebSearchTool) =
6299+
addTool(Tool.ofWebSearchTool(webSearchTool))
6300+
62966301
/**
62976302
* An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
62986303
*/

openai-java-core/src/main/kotlin/com/openai/models/responses/Response.kt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,13 +1227,14 @@ private constructor(
12271227
fun addFileSearchTool(vectorStoreIds: List<String>) =
12281228
addTool(FileSearchTool.builder().vectorStoreIds(vectorStoreIds).build())
12291229

1230-
/** Alias for calling [addTool] with `Tool.ofWebSearch(webSearch)`. */
1231-
fun addTool(webSearch: WebSearchTool) = addTool(Tool.ofWebSearch(webSearch))
1232-
12331230
/** Alias for calling [addTool] with `Tool.ofComputerUsePreview(computerUsePreview)`. */
12341231
fun addTool(computerUsePreview: ComputerTool) =
12351232
addTool(Tool.ofComputerUsePreview(computerUsePreview))
12361233

1234+
/** Alias for calling [addTool] with `Tool.ofWebSearchTool(webSearchTool)`. */
1235+
fun addTool(webSearchTool: Tool.WebSearchTool) =
1236+
addTool(Tool.ofWebSearchTool(webSearchTool))
1237+
12371238
/** Alias for calling [addTool] with `Tool.ofMcp(mcp)`. */
12381239
fun addTool(mcp: Tool.Mcp) = addTool(Tool.ofMcp(mcp))
12391240

@@ -1301,6 +1302,9 @@ private constructor(
13011302
*/
13021303
fun addCustomTool(name: String) = addTool(CustomTool.builder().name(name).build())
13031304

1305+
/** Alias for calling [addTool] with `Tool.ofWebSearchTool(webSearchTool)`. */
1306+
fun addTool(webSearchTool: WebSearchTool) = addTool(Tool.ofWebSearchTool(webSearchTool))
1307+
13041308
/**
13051309
* An alternative to sampling with temperature, called nucleus sampling, where the model
13061310
* considers the results of the tokens with top_p probability mass. So 0.1 means only the

openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCreateParams.kt

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ private constructor(
7878
/**
7979
* Specify additional output data to include in the model response. Currently supported values
8080
* are:
81+
* - `web_search_call.action.sources`: Include the sources of the web search tool call.
8182
* - `code_interpreter_call.outputs`: Includes the outputs of python code execution in code
8283
* interpreter tool call items.
8384
* - `computer_call_output.output.image_url`: Include image urls from the computer call output.
@@ -649,6 +650,7 @@ private constructor(
649650
/**
650651
* Specify additional output data to include in the model response. Currently supported
651652
* values are:
653+
* - `web_search_call.action.sources`: Include the sources of the web search tool call.
652654
* - `code_interpreter_call.outputs`: Includes the outputs of python code execution in code
653655
* interpreter tool call items.
654656
* - `computer_call_output.output.image_url`: Include image urls from the computer call
@@ -1210,12 +1212,12 @@ private constructor(
12101212
body.addFileSearchTool(vectorStoreIds)
12111213
}
12121214

1213-
/** Alias for calling [addTool] with `Tool.ofWebSearch(webSearch)`. */
1214-
fun addTool(webSearch: WebSearchTool) = apply { body.addTool(webSearch) }
1215-
12161215
/** Alias for calling [addTool] with `Tool.ofComputerUsePreview(computerUsePreview)`. */
12171216
fun addTool(computerUsePreview: ComputerTool) = apply { body.addTool(computerUsePreview) }
12181217

1218+
/** Alias for calling [addTool] with `Tool.ofWebSearchTool(webSearchTool)`. */
1219+
fun addTool(webSearchTool: Tool.WebSearchTool) = apply { body.addTool(webSearchTool) }
1220+
12191221
/** Alias for calling [addTool] with `Tool.ofMcp(mcp)`. */
12201222
fun addTool(mcp: Tool.Mcp) = apply { body.addTool(mcp) }
12211223

@@ -1277,6 +1279,9 @@ private constructor(
12771279
*/
12781280
fun addCustomTool(name: String) = apply { body.addCustomTool(name) }
12791281

1282+
/** Alias for calling [addTool] with `Tool.ofWebSearchTool(webSearchTool)`. */
1283+
fun addTool(webSearchTool: WebSearchTool) = apply { body.addTool(webSearchTool) }
1284+
12801285
/**
12811286
* An integer between 0 and 20 specifying the number of most likely tokens to return at each
12821287
* token position, each with an associated log probability.
@@ -1657,6 +1662,7 @@ private constructor(
16571662
/**
16581663
* Specify additional output data to include in the model response. Currently supported
16591664
* values are:
1665+
* - `web_search_call.action.sources`: Include the sources of the web search tool call.
16601666
* - `code_interpreter_call.outputs`: Includes the outputs of python code execution in code
16611667
* interpreter tool call items.
16621668
* - `computer_call_output.output.image_url`: Include image urls from the computer call
@@ -2311,6 +2317,7 @@ private constructor(
23112317
/**
23122318
* Specify additional output data to include in the model response. Currently supported
23132319
* values are:
2320+
* - `web_search_call.action.sources`: Include the sources of the web search tool call.
23142321
* - `code_interpreter_call.outputs`: Includes the outputs of python code execution in
23152322
* code interpreter tool call items.
23162323
* - `computer_call_output.output.image_url`: Include image urls from the computer call
@@ -2859,13 +2866,14 @@ private constructor(
28592866
fun addFileSearchTool(vectorStoreIds: List<String>) =
28602867
addTool(FileSearchTool.builder().vectorStoreIds(vectorStoreIds).build())
28612868

2862-
/** Alias for calling [addTool] with `Tool.ofWebSearch(webSearch)`. */
2863-
fun addTool(webSearch: WebSearchTool) = addTool(Tool.ofWebSearch(webSearch))
2864-
28652869
/** Alias for calling [addTool] with `Tool.ofComputerUsePreview(computerUsePreview)`. */
28662870
fun addTool(computerUsePreview: ComputerTool) =
28672871
addTool(Tool.ofComputerUsePreview(computerUsePreview))
28682872

2873+
/** Alias for calling [addTool] with `Tool.ofWebSearchTool(webSearchTool)`. */
2874+
fun addTool(webSearchTool: Tool.WebSearchTool) =
2875+
addTool(Tool.ofWebSearchTool(webSearchTool))
2876+
28692877
/** Alias for calling [addTool] with `Tool.ofMcp(mcp)`. */
28702878
fun addTool(mcp: Tool.Mcp) = addTool(Tool.ofMcp(mcp))
28712879

@@ -2935,6 +2943,9 @@ private constructor(
29352943
*/
29362944
fun addCustomTool(name: String) = addTool(CustomTool.builder().name(name).build())
29372945

2946+
/** Alias for calling [addTool] with `Tool.ofWebSearchTool(webSearchTool)`. */
2947+
fun addTool(webSearchTool: WebSearchTool) = addTool(Tool.ofWebSearchTool(webSearchTool))
2948+
29382949
/**
29392950
* An integer between 0 and 20 specifying the number of most likely tokens to return at
29402951
* each token position, each with an associated log probability.

0 commit comments

Comments
 (0)