Skip to content

Commit db819d5

Browse files
chore(api): accurately represent shape for verbosity on Chat Completions
1 parent b015df6 commit db819d5

26 files changed

+189
-1292
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 111
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-24be531010b354303d741fc9247c1f84f75978f9f7de68aca92cb4f240a04722.yml
3-
openapi_spec_hash: 3e46f439f6a863beadc71577eb4efa15
4-
config_hash: ed87b9139ac595a04a2162d754df2fed
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-7ef7a457c3bf05364e66e48c9ca34f31bfef1f6c9b7c15b1812346105e0abb16.yml
3+
openapi_spec_hash: a2b1f5d8fbb62175c93b0ebea9f10063
4+
config_hash: 76afa3236f36854a8705f1281b1990b8

openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionCreateParams.kt

Lines changed: 5 additions & 358 deletions
Large diffs are not rendered by default.

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4667,8 +4667,8 @@ private constructor(
46674667
.build()
46684668

46694669
/**
4670-
* The evaluation metric to use. One of `fuzzy_match`, `bleu`, `gleu`, `meteor`,
4671-
* `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`.
4670+
* The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, `gleu`,
4671+
* `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`.
46724672
*
46734673
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is
46744674
* unexpectedly missing or null (e.g. if the server responded with an unexpected
@@ -4824,8 +4824,8 @@ private constructor(
48244824
}
48254825

48264826
/**
4827-
* The evaluation metric to use. One of `fuzzy_match`, `bleu`, `gleu`, `meteor`,
4828-
* `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`.
4827+
* The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, `gleu`,
4828+
* `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`.
48294829
*/
48304830
fun evaluationMetric(evaluationMetric: TextSimilarityGrader.EvaluationMetric) =
48314831
evaluationMetric(JsonField.of(evaluationMetric))

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,8 +1781,8 @@ private constructor(
17811781
.build()
17821782

17831783
/**
1784-
* The evaluation metric to use. One of `fuzzy_match`, `bleu`, `gleu`, `meteor`,
1785-
* `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`.
1784+
* The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, `gleu`,
1785+
* `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`.
17861786
*
17871787
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is
17881788
* unexpectedly missing or null (e.g. if the server responded with an unexpected
@@ -1940,8 +1940,8 @@ private constructor(
19401940
}
19411941

19421942
/**
1943-
* The evaluation metric to use. One of `fuzzy_match`, `bleu`, `gleu`, `meteor`,
1944-
* `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`.
1943+
* The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, `gleu`,
1944+
* `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`.
19451945
*/
19461946
fun evaluationMetric(evaluationMetric: TextSimilarityGrader.EvaluationMetric) =
19471947
evaluationMetric(JsonField.of(evaluationMetric))

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,8 +1781,8 @@ private constructor(
17811781
.build()
17821782

17831783
/**
1784-
* The evaluation metric to use. One of `fuzzy_match`, `bleu`, `gleu`, `meteor`,
1785-
* `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`.
1784+
* The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, `gleu`,
1785+
* `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`.
17861786
*
17871787
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is
17881788
* unexpectedly missing or null (e.g. if the server responded with an unexpected
@@ -1940,8 +1940,8 @@ private constructor(
19401940
}
19411941

19421942
/**
1943-
* The evaluation metric to use. One of `fuzzy_match`, `bleu`, `gleu`, `meteor`,
1944-
* `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`.
1943+
* The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, `gleu`,
1944+
* `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`.
19451945
*/
19461946
fun evaluationMetric(evaluationMetric: TextSimilarityGrader.EvaluationMetric) =
19471947
evaluationMetric(JsonField.of(evaluationMetric))

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,8 +1781,8 @@ private constructor(
17811781
.build()
17821782

17831783
/**
1784-
* The evaluation metric to use. One of `fuzzy_match`, `bleu`, `gleu`, `meteor`,
1785-
* `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`.
1784+
* The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, `gleu`,
1785+
* `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`.
17861786
*
17871787
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is
17881788
* unexpectedly missing or null (e.g. if the server responded with an unexpected
@@ -1940,8 +1940,8 @@ private constructor(
19401940
}
19411941

19421942
/**
1943-
* The evaluation metric to use. One of `fuzzy_match`, `bleu`, `gleu`, `meteor`,
1944-
* `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`.
1943+
* The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, `gleu`,
1944+
* `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`.
19451945
*/
19461946
fun evaluationMetric(evaluationMetric: TextSimilarityGrader.EvaluationMetric) =
19471947
evaluationMetric(JsonField.of(evaluationMetric))

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,8 +1781,8 @@ private constructor(
17811781
.build()
17821782

17831783
/**
1784-
* The evaluation metric to use. One of `fuzzy_match`, `bleu`, `gleu`, `meteor`,
1785-
* `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`.
1784+
* The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, `gleu`,
1785+
* `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`.
17861786
*
17871787
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is
17881788
* unexpectedly missing or null (e.g. if the server responded with an unexpected
@@ -1940,8 +1940,8 @@ private constructor(
19401940
}
19411941

19421942
/**
1943-
* The evaluation metric to use. One of `fuzzy_match`, `bleu`, `gleu`, `meteor`,
1944-
* `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`.
1943+
* The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, `gleu`,
1944+
* `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`.
19451945
*/
19461946
fun evaluationMetric(evaluationMetric: TextSimilarityGrader.EvaluationMetric) =
19471947
evaluationMetric(JsonField.of(evaluationMetric))

openai-java-core/src/main/kotlin/com/openai/models/graders/gradermodels/TextSimilarityGrader.kt

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ private constructor(
4040
) : this(evaluationMetric, input, name, reference, type, mutableMapOf())
4141

4242
/**
43-
* The evaluation metric to use. One of `fuzzy_match`, `bleu`, `gleu`, `meteor`, `rouge_1`,
44-
* `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`.
43+
* The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, `gleu`, `meteor`,
44+
* `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`.
4545
*
4646
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is
4747
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
@@ -165,8 +165,8 @@ private constructor(
165165
}
166166

167167
/**
168-
* The evaluation metric to use. One of `fuzzy_match`, `bleu`, `gleu`, `meteor`, `rouge_1`,
169-
* `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`.
168+
* The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, `gleu`, `meteor`,
169+
* `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`.
170170
*/
171171
fun evaluationMetric(evaluationMetric: EvaluationMetric) =
172172
evaluationMetric(JsonField.of(evaluationMetric))
@@ -316,8 +316,8 @@ private constructor(
316316
type.let { if (it == JsonValue.from("text_similarity")) 1 else 0 }
317317

318318
/**
319-
* The evaluation metric to use. One of `fuzzy_match`, `bleu`, `gleu`, `meteor`, `rouge_1`,
320-
* `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`.
319+
* The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, `gleu`, `meteor`,
320+
* `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`.
321321
*/
322322
class EvaluationMetric @JsonCreator private constructor(private val value: JsonField<String>) :
323323
Enum {
@@ -334,6 +334,8 @@ private constructor(
334334

335335
companion object {
336336

337+
@JvmField val COSINE = of("cosine")
338+
337339
@JvmField val FUZZY_MATCH = of("fuzzy_match")
338340

339341
@JvmField val BLEU = of("bleu")
@@ -359,6 +361,7 @@ private constructor(
359361

360362
/** An enum containing [EvaluationMetric]'s known values. */
361363
enum class Known {
364+
COSINE,
362365
FUZZY_MATCH,
363366
BLEU,
364367
GLEU,
@@ -381,6 +384,7 @@ private constructor(
381384
* - It was constructed with an arbitrary value using the [of] method.
382385
*/
383386
enum class Value {
387+
COSINE,
384388
FUZZY_MATCH,
385389
BLEU,
386390
GLEU,
@@ -407,6 +411,7 @@ private constructor(
407411
*/
408412
fun value(): Value =
409413
when (this) {
414+
COSINE -> Value.COSINE
410415
FUZZY_MATCH -> Value.FUZZY_MATCH
411416
BLEU -> Value.BLEU
412417
GLEU -> Value.GLEU
@@ -431,6 +436,7 @@ private constructor(
431436
*/
432437
fun known(): Known =
433438
when (this) {
439+
COSINE -> Known.COSINE
434440
FUZZY_MATCH -> Known.FUZZY_MATCH
435441
BLEU -> Known.BLEU
436442
GLEU -> Known.GLEU

0 commit comments

Comments
 (0)