Skip to content

Commit 9d36a33

Browse files
Merge pull request #211 from openai/erinkav/temperature
Spec updates for temperature and message addition
2 parents 399458c + 9fcd900 commit 9d36a33

File tree

1 file changed

+45
-12
lines changed

1 file changed

+45
-12
lines changed

openapi.yaml

Lines changed: 45 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3766,7 +3766,8 @@ paths:
37663766
"tools": [],
37673767
"file_ids": [],
37683768
"metadata": {},
3769-
"usage": null
3769+
"usage": null,
3770+
"temperature": 1
37703771
}
37713772
37723773
- title: Streaming
@@ -4147,7 +4148,8 @@ paths:
41474148
"prompt_tokens": 123,
41484149
"completion_tokens": 456,
41494150
"total_tokens": 579
4150-
}
4151+
},
4152+
"temperature": 1
41514153
},
41524154
{
41534155
"id": "run_abc456",
@@ -4178,7 +4180,8 @@ paths:
41784180
"prompt_tokens": 123,
41794181
"completion_tokens": 456,
41804182
"total_tokens": 579
4181-
}
4183+
},
4184+
"temperature": 1
41824185
}
41834186
],
41844187
"first_id": "run_abc123",
@@ -4277,7 +4280,8 @@ paths:
42774280
"file-abc456"
42784281
],
42794282
"metadata": {},
4280-
"usage": null
4283+
"usage": null,
4284+
"temperature": 1
42814285
}
42824286
- title: Streaming
42834287
request:
@@ -4612,7 +4616,8 @@ paths:
46124616
"prompt_tokens": 123,
46134617
"completion_tokens": 456,
46144618
"total_tokens": 579
4615-
}
4619+
},
4620+
"temperature": 1
46164621
}
46174622
post:
46184623
operationId: modifyRun
@@ -4725,7 +4730,8 @@ paths:
47254730
"prompt_tokens": 123,
47264731
"completion_tokens": 456,
47274732
"total_tokens": 579
4728-
}
4733+
},
4734+
"temperature": 1
47294735
}
47304736
47314737
/threads/{thread_id}/runs/{run_id}/submit_tool_outputs:
@@ -4862,7 +4868,8 @@ paths:
48624868
],
48634869
"file_ids": [],
48644870
"metadata": {},
4865-
"usage": null
4871+
"usage": null,
4872+
"temperature": 1
48664873
}
48674874
48684875
- title: Streaming
@@ -5061,7 +5068,8 @@ paths:
50615068
],
50625069
"file_ids": [],
50635070
"metadata": {},
5064-
"usage": null
5071+
"usage": null,
5072+
"temperature": 1
50655073
}
50665074
50675075
/threads/{thread_id}/runs/{run_id}/steps:
@@ -8522,6 +8530,10 @@ components:
85228530
nullable: true
85238531
usage:
85248532
$ref: "#/components/schemas/RunCompletionUsage"
8533+
temperature:
8534+
description: The sampling temperature used for this run. If not set, defaults to 1.
8535+
type: number
8536+
nullable: true
85258537
required:
85268538
- id
85278539
- object
@@ -8568,7 +8580,8 @@ components:
85688580
"prompt_tokens": 123,
85698581
"completion_tokens": 456,
85708582
"total_tokens": 579
8571-
}
8583+
},
8584+
"temperature": 1
85728585
}
85738586
CreateRunRequest:
85748587
type: object
@@ -8605,6 +8618,15 @@ components:
86058618
type: object
86068619
x-oaiTypeLabel: map
86078620
nullable: true
8621+
temperature:
8622+
type: number
8623+
minimum: 0
8624+
maximum: 2
8625+
default: 1
8626+
example: 1
8627+
nullable: true
8628+
description: &run_temperature_description |
8629+
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
86088630
stream:
86098631
type: boolean
86108632
nullable: true
@@ -8733,6 +8755,14 @@ components:
87338755
type: object
87348756
x-oaiTypeLabel: map
87358757
nullable: true
8758+
temperature:
8759+
type: number
8760+
minimum: 0
8761+
maximum: 2
8762+
default: 1
8763+
example: 1
8764+
nullable: true
8765+
description: *run_temperature_description
87368766
stream:
87378767
type: boolean
87388768
nullable: true
@@ -8901,7 +8931,7 @@ components:
89018931
type: string
89028932
nullable: true
89038933
run_id:
8904-
description: If applicable, the ID of the [run](/docs/api-reference/runs) associated with the authoring of this message.
8934+
description: The ID of the [run](/docs/api-reference/runs) associated with the creation of this message. Value is `null` when messages are created manually using the create message or create thread endpoints.
89058935
type: string
89068936
nullable: true
89078937
file_ids:
@@ -9024,8 +9054,11 @@ components:
90249054
properties:
90259055
role:
90269056
type: string
9027-
enum: ["user"]
9028-
description: The role of the entity that is creating the message. Currently only `user` is supported.
9057+
enum: ["user", "assistant"]
9058+
description: |
9059+
The role of the entity that is creating the message. Allowed values include:
9060+
- `user`: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages.
9061+
- `assistant`: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation.
90299062
content:
90309063
type: string
90319064
minLength: 1

0 commit comments

Comments
 (0)