Skip to content

Commit 31c26d3

Browse files
committed
Move warnings to a top level type to simplify consistent access
1 parent 905080b commit 31c26d3

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

openapi.yaml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -385,9 +385,9 @@ paths:
385385
api_key=os.environ.get("TOGETHER_API_KEY"),
386386
)
387387
388-
response = client.models.list()
388+
models = client.models.list()
389389
390-
for model in response:
390+
for model in models:
391391
print(model.id)
392392
- lang: TypeScript
393393
label: Together AI SDK (TypeScript)
@@ -398,9 +398,9 @@ paths:
398398
apiKey: process.env.TOGETHER_API_KEY,
399399
});
400400
401-
const response = await client.models.list();
401+
const models = await client.models.list();
402402
403-
for (const model of response) {
403+
for (const model of models) {
404404
console.log(model.id);
405405
}
406406
- lang: JavaScript
@@ -412,9 +412,9 @@ paths:
412412
apiKey: process.env.TOGETHER_API_KEY,
413413
});
414414
415-
const response = await client.models.list();
415+
const models = await client.models.list();
416416
417-
for (const model of response) {
417+
for (const model of models) {
418418
console.log(model.id);
419419
}
420420
- lang: Shell
@@ -3348,6 +3348,14 @@ components:
33483348
logprobs:
33493349
$ref: '#/components/schemas/LogprobsPart'
33503350

3351+
InferenceWarning:
3352+
type: object
3353+
required:
3354+
- message
3355+
properties:
3356+
message:
3357+
type: string
3358+
33513359
UsageData:
33523360
type: object
33533361
properties:
@@ -3995,10 +4003,7 @@ components:
39954003
warnings:
39964004
type: array
39974005
items:
3998-
type: object
3999-
properties:
4000-
message:
4001-
type: string
4006+
$ref: '#/components/schemas/InferenceWarning'
40024007
required: [choices, id, created, model, object]
40034008

40044009
ChatCompletionStream:
@@ -4084,10 +4089,7 @@ components:
40844089
warnings:
40854090
type: array
40864091
items:
4087-
type: object
4088-
properties:
4089-
message:
4090-
type: string
4092+
$ref: '#/components/schemas/InferenceWarning'
40914093
AudioSpeechRequest:
40924094
type: object
40934095
required:

0 commit comments

Comments
 (0)