Skip to content
Closed
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
12 changes: 6 additions & 6 deletions .castiron.stats.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
schema_version: 1
generation_id: a2e15f59-94b2-41a7-83a2-0aa28ffd7091
openapi_spec_hash: 0ba3e4acd88b521d832e2a42d5471e00
openapi_transformed_spec_hash: 0a6002520553b981f4c0bf6555a0a623
generation_id: fef4406c-d79d-4929-be42-636e065492e3
openapi_spec_hash: e20c8c5d5ffad89da6fbb14b57d894f1
openapi_transformed_spec_hash: 174a43233549b09ebc982daba97832fa
config_hash: d8813efd847d1966dd7f03bb648c41dc
codegen_sha: 23fe5abcd01bf9d6dd1c1ee49b6244f9d2d078ce
codegen_hash: 2c513214ca2f30afc9ae2724d5b78c068dac45d959bc1c4f1d8b4706f507f3ca
public_codegen_sha: 0c208e28bddcefe8be7b5a0b94be94b8b973ed4e
codegen_sha: 46f1ea420fa56168af5784e690d21edab330f5d9
codegen_hash: 1639bed1e5f83245883989fd6fd2aa83e1e346ebbde41244abd09f121037fc42
public_codegen_sha: cbd5150d543315558ec70410c987c98e39d7edb4
4 changes: 0 additions & 4 deletions api_reference/openapi.transformed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53305,7 +53305,6 @@ components:
required:
- type
- item_id
- name
- output_index
- arguments
- sequence_number
Expand All @@ -53316,7 +53315,6 @@ components:
{
"type": "response.function_call_arguments.done",
"item_id": "item-abc",
"name": "get_weather",
"output_index": 1,
"arguments": "{ \"arg\": 123 }",
"sequence_number": 1
Expand Down Expand Up @@ -76336,7 +76334,6 @@ components:
required:
- type
- item_id
- name
- output_index
- arguments
- sequence_number
Expand All @@ -76347,7 +76344,6 @@ components:
{
"type": "response.function_call_arguments.done",
"item_id": "item-abc",
"name": "get_weather",
"output_index": 1,
"arguments": "{ \"arg\": 123 }",
"sequence_number": 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,18 @@ class BetaResponseFunctionCallArgumentsDoneEvent
private constructor(
private val arguments: JsonField<String>,
private val itemId: JsonField<String>,
private val name: JsonField<String>,
private val outputIndex: JsonField<Long>,
private val sequenceNumber: JsonField<Long>,
private val type: JsonValue,
private val agent: JsonField<Agent>,
private val name: JsonField<String>,
private val additionalProperties: MutableMap<String, JsonValue>,
) {

@JsonCreator
private constructor(
@JsonProperty("arguments") @ExcludeMissing arguments: JsonField<String> = JsonMissing.of(),
@JsonProperty("item_id") @ExcludeMissing itemId: JsonField<String> = JsonMissing.of(),
@JsonProperty("name") @ExcludeMissing name: JsonField<String> = JsonMissing.of(),
@JsonProperty("output_index")
@ExcludeMissing
outputIndex: JsonField<Long> = JsonMissing.of(),
Expand All @@ -44,7 +43,8 @@ private constructor(
sequenceNumber: JsonField<Long> = JsonMissing.of(),
@JsonProperty("type") @ExcludeMissing type: JsonValue = JsonMissing.of(),
@JsonProperty("agent") @ExcludeMissing agent: JsonField<Agent> = JsonMissing.of(),
) : this(arguments, itemId, name, outputIndex, sequenceNumber, type, agent, mutableMapOf())
@JsonProperty("name") @ExcludeMissing name: JsonField<String> = JsonMissing.of(),
) : this(arguments, itemId, outputIndex, sequenceNumber, type, agent, name, mutableMapOf())

/**
* The function-call arguments.
Expand All @@ -62,14 +62,6 @@ private constructor(
*/
fun itemId(): String = itemId.getRequired("item_id")

/**
* The name of the function that was called.
*
* @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 name(): String = name.getRequired("name")

/**
* The index of the output item.
*
Expand Down Expand Up @@ -105,6 +97,14 @@ private constructor(
*/
fun agent(): Optional<Agent> = agent.getOptional("agent")

/**
* The name of the function that was called.
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
fun name(): Optional<String> = name.getOptional("name")

/**
* Returns the raw JSON value of [arguments].
*
Expand All @@ -119,13 +119,6 @@ private constructor(
*/
@JsonProperty("item_id") @ExcludeMissing fun _itemId(): JsonField<String> = itemId

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

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

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

@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
additionalProperties.put(key, value)
Expand All @@ -171,7 +171,6 @@ private constructor(
* ```java
* .arguments()
* .itemId()
* .name()
* .outputIndex()
* .sequenceNumber()
* ```
Expand All @@ -184,11 +183,11 @@ private constructor(

private var arguments: JsonField<String>? = null
private var itemId: JsonField<String>? = null
private var name: JsonField<String>? = null
private var outputIndex: JsonField<Long>? = null
private var sequenceNumber: JsonField<Long>? = null
private var type: JsonValue = JsonValue.from("response.function_call_arguments.done")
private var agent: JsonField<Agent> = JsonMissing.of()
private var name: JsonField<String> = JsonMissing.of()
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()

@JvmSynthetic
Expand All @@ -197,11 +196,11 @@ private constructor(
) = apply {
arguments = betaResponseFunctionCallArgumentsDoneEvent.arguments
itemId = betaResponseFunctionCallArgumentsDoneEvent.itemId
name = betaResponseFunctionCallArgumentsDoneEvent.name
outputIndex = betaResponseFunctionCallArgumentsDoneEvent.outputIndex
sequenceNumber = betaResponseFunctionCallArgumentsDoneEvent.sequenceNumber
type = betaResponseFunctionCallArgumentsDoneEvent.type
agent = betaResponseFunctionCallArgumentsDoneEvent.agent
name = betaResponseFunctionCallArgumentsDoneEvent.name
additionalProperties =
betaResponseFunctionCallArgumentsDoneEvent.additionalProperties.toMutableMap()
}
Expand Down Expand Up @@ -229,17 +228,6 @@ private constructor(
*/
fun itemId(itemId: JsonField<String>) = apply { this.itemId = itemId }

/** The name of the function that was called. */
fun name(name: String) = name(JsonField.of(name))

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

/** The index of the output item. */
fun outputIndex(outputIndex: Long) = outputIndex(JsonField.of(outputIndex))

Expand Down Expand Up @@ -294,6 +282,17 @@ private constructor(
*/
fun agent(agent: JsonField<Agent>) = apply { this.agent = agent }

/** The name of the function that was called. */
fun name(name: String) = name(JsonField.of(name))

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

fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
Expand Down Expand Up @@ -322,7 +321,6 @@ private constructor(
* ```java
* .arguments()
* .itemId()
* .name()
* .outputIndex()
* .sequenceNumber()
* ```
Expand All @@ -333,11 +331,11 @@ private constructor(
BetaResponseFunctionCallArgumentsDoneEvent(
checkRequired("arguments", arguments),
checkRequired("itemId", itemId),
checkRequired("name", name),
checkRequired("outputIndex", outputIndex),
checkRequired("sequenceNumber", sequenceNumber),
type,
agent,
name,
additionalProperties.toMutableMap(),
)
}
Expand All @@ -359,7 +357,6 @@ private constructor(

arguments()
itemId()
name()
outputIndex()
sequenceNumber()
_type().let {
Expand All @@ -368,6 +365,7 @@ private constructor(
}
}
agent().ifPresent { it.validate() }
name()
validated = true
}

Expand All @@ -388,13 +386,13 @@ private constructor(
internal fun validity(): Int =
(if (arguments.asKnown().isPresent) 1 else 0) +
(if (itemId.asKnown().isPresent) 1 else 0) +
(if (name.asKnown().isPresent) 1 else 0) +
(if (outputIndex.asKnown().isPresent) 1 else 0) +
(if (sequenceNumber.asKnown().isPresent) 1 else 0) +
type.let {
if (it == JsonValue.from("response.function_call_arguments.done")) 1 else 0
} +
(agent.asKnown().getOrNull()?.validity() ?: 0)
(agent.asKnown().getOrNull()?.validity() ?: 0) +
(if (name.asKnown().isPresent) 1 else 0)

/** The agent that owns this multi-agent streaming event. */
class Agent
Expand Down Expand Up @@ -572,29 +570,29 @@ private constructor(
return other is BetaResponseFunctionCallArgumentsDoneEvent &&
arguments == other.arguments &&
itemId == other.itemId &&
name == other.name &&
outputIndex == other.outputIndex &&
sequenceNumber == other.sequenceNumber &&
type == other.type &&
agent == other.agent &&
name == other.name &&
additionalProperties == other.additionalProperties
}

private val hashCode: Int by lazy {
Objects.hash(
arguments,
itemId,
name,
outputIndex,
sequenceNumber,
type,
agent,
name,
additionalProperties,
)
}

override fun hashCode(): Int = hashCode

override fun toString() =
"BetaResponseFunctionCallArgumentsDoneEvent{arguments=$arguments, itemId=$itemId, name=$name, outputIndex=$outputIndex, sequenceNumber=$sequenceNumber, type=$type, agent=$agent, additionalProperties=$additionalProperties}"
"BetaResponseFunctionCallArgumentsDoneEvent{arguments=$arguments, itemId=$itemId, outputIndex=$outputIndex, sequenceNumber=$sequenceNumber, type=$type, agent=$agent, name=$name, additionalProperties=$additionalProperties}"
}
Loading
Loading