Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .castiron.stats.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
schema_version: 1
generation_id: d5f4ed15-606a-40de-99cc-7624ca170180
openapi_spec_hash: b2c62b342b04685226037c980f2b5a7a
openapi_transformed_spec_hash: ba44bf31326f01a1d886b7510dd9da8a
config_hash: 4fbbbcf377bcc17646cccb9fcfbac14a
codegen_sha: 41b7af5cc4a284522463cb9ac54053a29f9642ef
codegen_hash: 6c8ab5a5c306f169798c284065aa2844565e87ef175da1e1227914c9d7b4a9e7
public_codegen_sha: 7661007907a5a6520bb17cffeeb1732809872c33
generation_id: 2582da1f-8818-4a38-8a5e-f2a460596a3b
openapi_spec_hash: 32e9f9c8096eae027754def9afb89dc0
openapi_transformed_spec_hash: a5861d7f7b67f6845c9499fdec7324a5
config_hash: 5c00fe18ea913ed0186f9894adc02a70
codegen_sha: 60cd82adcea1d595899112511aaf9cf9ced7ab54
codegen_hash: 157a1c53e8ed2d058cca05b73e91dfc159cb5f016b21d1581a17577ad9296e63
public_codegen_sha: 21201cc03353dc220a304f4145f33f80e4357db8
24 changes: 12 additions & 12 deletions api_reference/openapi.transformed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37968,7 +37968,6 @@ components:
- incomplete
required:
- type
- call_id
- output
FunctionToolCallOutputResource:
allOf:
Expand Down Expand Up @@ -63939,10 +63938,12 @@ components:
example: fc_123
- type: 'null'
call_id:
type: string
maxLength: 64
minLength: 1
description: The unique ID of the function tool call generated by the model.
anyOf:
- type: string
maxLength: 64
minLength: 1
description: The unique ID of the function tool call generated by the model.
- type: 'null'
type:
type: string
enum:
Expand Down Expand Up @@ -63994,7 +63995,6 @@ components:
type: object
required:
- type
- call_id
- output
title: Function tool call output
description: The output of a function tool call.
Expand Down Expand Up @@ -71251,10 +71251,12 @@ components:
example: fc_123
- type: 'null'
call_id:
type: string
maxLength: 64
minLength: 1
description: The unique ID of the function tool call generated by the model.
anyOf:
- type: string
maxLength: 64
minLength: 1
description: The unique ID of the function tool call generated by the model.
- type: 'null'
type:
type: string
enum:
Expand Down Expand Up @@ -71306,7 +71308,6 @@ components:
type: object
required:
- type
- call_id
- output
title: Function tool call output
description: The output of a function tool call.
Expand Down Expand Up @@ -73658,7 +73659,6 @@ components:
- incomplete
required:
- type
- call_id
- output
BetaFunctionToolCallResource:
allOf:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ class BetaResponseFunctionToolCallOutputItem
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val id: JsonField<String>,
private val callId: JsonField<String>,
private val output: JsonField<Output>,
private val status: JsonField<Status>,
private val type: JsonValue,
private val agent: JsonField<Agent>,
private val callId: JsonField<String>,
private val caller: JsonField<Caller>,
private val createdBy: JsonField<String>,
private val name: JsonField<String>,
Expand All @@ -49,22 +49,22 @@ private constructor(
@JsonCreator
private constructor(
@JsonProperty("id") @ExcludeMissing id: JsonField<String> = JsonMissing.of(),
@JsonProperty("call_id") @ExcludeMissing callId: JsonField<String> = JsonMissing.of(),
@JsonProperty("output") @ExcludeMissing output: JsonField<Output> = JsonMissing.of(),
@JsonProperty("status") @ExcludeMissing status: JsonField<Status> = JsonMissing.of(),
@JsonProperty("type") @ExcludeMissing type: JsonValue = JsonMissing.of(),
@JsonProperty("agent") @ExcludeMissing agent: JsonField<Agent> = JsonMissing.of(),
@JsonProperty("call_id") @ExcludeMissing callId: JsonField<String> = JsonMissing.of(),
@JsonProperty("caller") @ExcludeMissing caller: JsonField<Caller> = JsonMissing.of(),
@JsonProperty("created_by") @ExcludeMissing createdBy: JsonField<String> = JsonMissing.of(),
@JsonProperty("name") @ExcludeMissing name: JsonField<String> = JsonMissing.of(),
@JsonProperty("namespace") @ExcludeMissing namespace: JsonField<String> = JsonMissing.of(),
) : this(
id,
callId,
output,
status,
type,
agent,
callId,
caller,
createdBy,
name,
Expand All @@ -80,14 +80,6 @@ private constructor(
*/
fun id(): String = id.getRequired("id")

/**
* The unique ID of the function tool call generated by the model.
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
fun callId(): String = callId.getRequired("call_id")

/**
* The output from the function call generated by your code. Can be a string or an list of
* output content.
Expand Down Expand Up @@ -127,6 +119,14 @@ private constructor(
*/
fun agent(): Optional<Agent> = agent.getOptional("agent")

/**
* The unique ID of the function tool call generated by the model.
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
fun callId(): Optional<String> = callId.getOptional("call_id")

/**
* The execution context that produced this tool call.
*
Expand Down Expand Up @@ -166,13 +166,6 @@ private constructor(
*/
@JsonProperty("id") @ExcludeMissing fun _id(): JsonField<String> = id

/**
* Returns the raw JSON value of [callId].
*
* Unlike [callId], this method doesn't throw if the JSON field has an unexpected type.
*/
@JsonProperty("call_id") @ExcludeMissing fun _callId(): JsonField<String> = callId

/**
* Returns the raw JSON value of [output].
*
Expand All @@ -194,6 +187,13 @@ private constructor(
*/
@JsonProperty("agent") @ExcludeMissing fun _agent(): JsonField<Agent> = agent

/**
* Returns the raw JSON value of [callId].
*
* Unlike [callId], this method doesn't throw if the JSON field has an unexpected type.
*/
@JsonProperty("call_id") @ExcludeMissing fun _callId(): JsonField<String> = callId

/**
* Returns the raw JSON value of [caller].
*
Expand Down Expand Up @@ -243,7 +243,6 @@ private constructor(
* The following fields are required:
* ```java
* .id()
* .callId()
* .output()
* .status()
* ```
Expand All @@ -255,11 +254,11 @@ private constructor(
class Builder internal constructor() {

private var id: JsonField<String>? = null
private var callId: JsonField<String>? = null
private var output: JsonField<Output>? = null
private var status: JsonField<Status>? = null
private var type: JsonValue = JsonValue.from("function_call_output")
private var agent: JsonField<Agent> = JsonMissing.of()
private var callId: JsonField<String> = JsonMissing.of()
private var caller: JsonField<Caller> = JsonMissing.of()
private var createdBy: JsonField<String> = JsonMissing.of()
private var name: JsonField<String> = JsonMissing.of()
Expand All @@ -271,11 +270,11 @@ private constructor(
betaResponseFunctionToolCallOutputItem: BetaResponseFunctionToolCallOutputItem
) = apply {
id = betaResponseFunctionToolCallOutputItem.id
callId = betaResponseFunctionToolCallOutputItem.callId
output = betaResponseFunctionToolCallOutputItem.output
status = betaResponseFunctionToolCallOutputItem.status
type = betaResponseFunctionToolCallOutputItem.type
agent = betaResponseFunctionToolCallOutputItem.agent
callId = betaResponseFunctionToolCallOutputItem.callId
caller = betaResponseFunctionToolCallOutputItem.caller
createdBy = betaResponseFunctionToolCallOutputItem.createdBy
name = betaResponseFunctionToolCallOutputItem.name
Expand All @@ -295,17 +294,6 @@ private constructor(
*/
fun id(id: JsonField<String>) = apply { this.id = id }

/** The unique ID of the function tool call generated by the model. */
fun callId(callId: String) = callId(JsonField.of(callId))

/**
* Sets [Builder.callId] to an arbitrary JSON value.
*
* You should usually call [Builder.callId] with a well-typed [String] value instead. This
* method is primarily for setting the field to an undocumented or not yet supported value.
*/
fun callId(callId: JsonField<String>) = apply { this.callId = callId }

/**
* The output from the function call generated by your code. Can be a string or an list of
* output content.
Expand Down Expand Up @@ -369,6 +357,17 @@ private constructor(
*/
fun agent(agent: JsonField<Agent>) = apply { this.agent = agent }

/** The unique ID of the function tool call generated by the model. */
fun callId(callId: String) = callId(JsonField.of(callId))

/**
* Sets [Builder.callId] to an arbitrary JSON value.
*
* You should usually call [Builder.callId] with a well-typed [String] value instead. This
* method is primarily for setting the field to an undocumented or not yet supported value.
*/
fun callId(callId: JsonField<String>) = apply { this.callId = callId }

/** The execution context that produced this tool call. */
fun caller(caller: Caller?) = caller(JsonField.ofNullable(caller))

Expand Down Expand Up @@ -462,7 +461,6 @@ private constructor(
* The following fields are required:
* ```java
* .id()
* .callId()
* .output()
* .status()
* ```
Expand All @@ -472,11 +470,11 @@ private constructor(
fun build(): BetaResponseFunctionToolCallOutputItem =
BetaResponseFunctionToolCallOutputItem(
checkRequired("id", id),
checkRequired("callId", callId),
checkRequired("output", output),
checkRequired("status", status),
type,
agent,
callId,
caller,
createdBy,
name,
Expand All @@ -501,7 +499,6 @@ private constructor(
}

id()
callId()
output().validate()
status().validate()
_type().let {
Expand All @@ -510,6 +507,7 @@ private constructor(
}
}
agent().ifPresent { it.validate() }
callId()
caller().ifPresent { it.validate() }
createdBy()
name()
Expand All @@ -533,11 +531,11 @@ private constructor(
@JvmSynthetic
internal fun validity(): Int =
(if (id.asKnown().isPresent) 1 else 0) +
(if (callId.asKnown().isPresent) 1 else 0) +
(output.asKnown().getOrNull()?.validity() ?: 0) +
(status.asKnown().getOrNull()?.validity() ?: 0) +
type.let { if (it == JsonValue.from("function_call_output")) 1 else 0 } +
(agent.asKnown().getOrNull()?.validity() ?: 0) +
(if (callId.asKnown().isPresent) 1 else 0) +
(caller.asKnown().getOrNull()?.validity() ?: 0) +
(if (createdBy.asKnown().isPresent) 1 else 0) +
(if (name.asKnown().isPresent) 1 else 0) +
Expand Down Expand Up @@ -1815,11 +1813,11 @@ private constructor(

return other is BetaResponseFunctionToolCallOutputItem &&
id == other.id &&
callId == other.callId &&
output == other.output &&
status == other.status &&
type == other.type &&
agent == other.agent &&
callId == other.callId &&
caller == other.caller &&
createdBy == other.createdBy &&
name == other.name &&
Expand All @@ -1830,11 +1828,11 @@ private constructor(
private val hashCode: Int by lazy {
Objects.hash(
id,
callId,
output,
status,
type,
agent,
callId,
caller,
createdBy,
name,
Expand All @@ -1846,5 +1844,5 @@ private constructor(
override fun hashCode(): Int = hashCode

override fun toString() =
"BetaResponseFunctionToolCallOutputItem{id=$id, callId=$callId, output=$output, status=$status, type=$type, agent=$agent, caller=$caller, createdBy=$createdBy, name=$name, namespace=$namespace, additionalProperties=$additionalProperties}"
"BetaResponseFunctionToolCallOutputItem{id=$id, output=$output, status=$status, type=$type, agent=$agent, callId=$callId, caller=$caller, createdBy=$createdBy, name=$name, namespace=$namespace, additionalProperties=$additionalProperties}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,40 @@ private constructor(
fun addInput(functionCallOutput: BetaResponseInputItem.FunctionCallOutput) =
addInput(BetaResponseInputItem.ofFunctionCallOutput(functionCallOutput))

/**
* Alias for calling [addInput] with the following:
* ```java
* BetaResponseInputItem.FunctionCallOutput.builder()
* .output(output)
* .build()
* ```
*/
fun addFunctionCallOutputInput(output: BetaResponseInputItem.FunctionCallOutput.Output) =
addInput(BetaResponseInputItem.FunctionCallOutput.builder().output(output).build())

/**
* Alias for calling [addFunctionCallOutputInput] with
* `BetaResponseInputItem.FunctionCallOutput.Output.ofString(string)`.
*/
fun addFunctionCallOutputInput(string: String) =
addFunctionCallOutputInput(
BetaResponseInputItem.FunctionCallOutput.Output.ofString(string)
)

/**
* Alias for calling [addFunctionCallOutputInput] with
* `BetaResponseInputItem.FunctionCallOutput.Output.ofBetaResponseFunctionCallOutputItemList(betaResponseFunctionCallOutputItemList)`.
*/
fun addFunctionCallOutputInputOfBetaResponseFunctionCallOutputItemList(
betaResponseFunctionCallOutputItemList: List<BetaResponseFunctionCallOutputItem>
) =
addFunctionCallOutputInput(
BetaResponseInputItem.FunctionCallOutput.Output
.ofBetaResponseFunctionCallOutputItemList(
betaResponseFunctionCallOutputItemList
)
)

/**
* Alias for calling [addInput] with `BetaResponseInputItem.ofAgentMessage(agentMessage)`.
*/
Expand Down
Loading
Loading