Skip to content

Commit 666c0db

Browse files
TomerAberbachstainless-app[bot]
authored andcommitted
chore: add missing delegate methods
1 parent c078d37 commit 666c0db

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,9 @@ class StructuredResponseCreateParams<T : Any>(
410410
/** @see ResponseCreateParams.Builder.addTool */
411411
fun addTool(mcp: Tool.Mcp) = apply { paramsBuilder.addTool(mcp) }
412412

413+
/** @see ResponseCreateParams.Builder.addMcpTool */
414+
fun addMcpTool(serverLabel: String) = apply { paramsBuilder.addMcpTool(serverLabel) }
415+
413416
/** @see ResponseCreateParams.Builder.addTool */
414417
fun addTool(codeInterpreter: Tool.CodeInterpreter) = apply {
415418
paramsBuilder.addTool(codeInterpreter)

openai-java-core/src/test/kotlin/com/openai/models/responses/StructuredResponseCreateParamsTest.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ internal class StructuredResponseCreateParamsTest {
196196
DelegationWriteTestCase("addTool", WEB_SEARCH_TOOL),
197197
DelegationWriteTestCase("addTool", COMPUTER_TOOL),
198198
DelegationWriteTestCase("addTool", MCP_TOOL),
199+
DelegationWriteTestCase("addMcpTool", STRING),
199200
DelegationWriteTestCase("addTool", CODE_INTERPRETER_TOOL),
200201
DelegationWriteTestCase("addCodeInterpreterTool", CODE_INTERPRETER_CONTAINER),
201202
DelegationWriteTestCase("addCodeInterpreterTool", STRING),

0 commit comments

Comments
 (0)