Update openai.yaml

This commit is contained in:
Luke Hagar
2024-06-24 10:01:31 -05:00
committed by GitHub
parent 65b44423c6
commit cbd4b10331

View File

@@ -3897,7 +3897,6 @@ paths:
"deleted": true "deleted": true
} }
/threads/runs: /threads/runs:
post: post:
operationId: createThreadAndRun operationId: createThreadAndRun
@@ -7310,8 +7309,7 @@ components:
type: integer type: integer
description: The Unix timestamp (in seconds) of when the completion was created. description: The Unix timestamp (in seconds) of when the completion was created.
model: model:
type: string $ref: "#/components/schemas/ChatModel"
description: The model used for completion.
system_fingerprint: system_fingerprint:
type: string type: string
description: | description: |
@@ -7418,9 +7416,7 @@ components:
description: The contents of the system message. description: The contents of the system message.
type: string type: string
role: role:
type: string $ref: "#/components/schemas/ChatCompletionRole"
enum: ["system"]
description: The role of the messages author, in this case `system`.
name: name:
type: string type: string
description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. description: An optional name for the participant. Provides the model information to differentiate between participants of the same role.
@@ -7447,9 +7443,7 @@ components:
minItems: 1 minItems: 1
x-oaiExpandable: true x-oaiExpandable: true
role: role:
type: string $ref: "#/components/schemas/ChatCompletionRole"
enum: ["user"]
description: The role of the messages author, in this case `user`.
name: name:
type: string type: string
description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. description: An optional name for the participant. Provides the model information to differentiate between participants of the same role.
@@ -7467,9 +7461,7 @@ components:
description: | description: |
The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified. The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
role: role:
type: string $ref: "#/components/schemas/ChatCompletionRole"
enum: ["assistant"]
description: The role of the messages author, in this case `assistant`.
name: name:
type: string type: string
description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. description: An optional name for the participant. Provides the model information to differentiate between participants of the same role.
@@ -7497,9 +7489,7 @@ components:
title: Tool message title: Tool message
properties: properties:
role: role:
type: string $ref: "#/components/schemas/ChatCompletionRole"
enum: ["tool"]
description: The role of the messages author, in this case `tool`.
content: content:
type: string type: string
description: The contents of the tool message. description: The contents of the tool message.
@@ -7517,9 +7507,7 @@ components:
deprecated: true deprecated: true
properties: properties:
role: role:
type: string $ref: "#/components/schemas/ChatCompletionRole"
enum: ["function"]
description: The role of the messages author, in this case `function`.
content: content:
nullable: true nullable: true
type: string type: string
@@ -7722,9 +7710,7 @@ components:
tool_calls: tool_calls:
$ref: "#/components/schemas/ChatCompletionMessageToolCalls" $ref: "#/components/schemas/ChatCompletionMessageToolCalls"
role: role:
type: string $ref: "#/components/schemas/ChatCompletionRole"
enum: ["assistant"]
description: The role of the author of this message.
function_call: function_call:
type: object type: object
deprecated: true deprecated: true
@@ -7767,9 +7753,7 @@ components:
items: items:
$ref: "#/components/schemas/ChatCompletionMessageToolCallChunk" $ref: "#/components/schemas/ChatCompletionMessageToolCallChunk"
role: role:
type: string $ref: "#/components/schemas/ChatCompletionRole"
enum: ["system", "user", "assistant", "tool"]
description: The role of the author of this message.
CreateChatCompletionRequest: CreateChatCompletionRequest:
type: object type: object
@@ -7781,34 +7765,7 @@ components:
items: items:
$ref: "#/components/schemas/ChatCompletionRequestMessage" $ref: "#/components/schemas/ChatCompletionRequestMessage"
model: model:
description: ID of the model to use. See the [model endpoint compatibility](/docs/models/model-endpoint-compatibility) table for details on which models work with the Chat API. $ref: "#/components/schemas/ChatModel"
example: "gpt-4-turbo"
anyOf:
- type: string
- type: string
enum:
[
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
"gpt-4-turbo-preview",
"gpt-4-1106-preview",
"gpt-4-vision-preview",
"gpt-4",
"gpt-4-0314",
"gpt-4-0613",
"gpt-4-32k",
"gpt-4-32k-0314",
"gpt-4-32k-0613",
"gpt-3.5-turbo",
"gpt-3.5-turbo-16k",
"gpt-3.5-turbo-0301",
"gpt-3.5-turbo-0613",
"gpt-3.5-turbo-1106",
"gpt-3.5-turbo-0125",
"gpt-3.5-turbo-16k-0613",
]
x-oaiTypeLabel: string
frequency_penalty: frequency_penalty:
type: number type: number
default: 0 default: 0
@@ -8023,8 +7980,7 @@ components:
type: integer type: integer
description: The Unix timestamp (in seconds) of when the chat completion was created. description: The Unix timestamp (in seconds) of when the chat completion was created.
model: model:
type: string $ref: "#/components/schemas/ChatModel"
description: The model used for the chat completion.
system_fingerprint: system_fingerprint:
type: string type: string
description: | description: |
@@ -8081,8 +8037,7 @@ components:
type: integer type: integer
description: The Unix timestamp (in seconds) of when the chat completion was created. description: The Unix timestamp (in seconds) of when the chat completion was created.
model: model:
type: string $ref: "#/components/schemas/ChatModel"
description: The model used for the chat completion.
system_fingerprint: system_fingerprint:
type: string type: string
description: | description: |
@@ -8198,8 +8153,7 @@ components:
type: integer type: integer
description: The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp. description: The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.
model: model:
type: string $ref: "#/components/schemas/ChatModel"
description: The model to generate the completion.
system_fingerprint: system_fingerprint:
type: string type: string
description: | description: |
@@ -9355,8 +9309,7 @@ components:
required: required:
- n_epochs - n_epochs
model: model:
type: string $ref: "#/components/schemas/ChatModel"
description: The base model that is being fine-tuned.
object: object:
type: string type: string
description: The object type, which is always "fine_tuning.job". description: The object type, which is always "fine_tuning.job".
@@ -9786,33 +9739,7 @@ components:
additionalProperties: false additionalProperties: false
properties: properties:
model: model:
description: *model_description $ref: "#/components/schemas/ChatModel"
example: "gpt-4-turbo"
anyOf:
- type: string
- type: string
enum:
[
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
"gpt-4-turbo-preview",
"gpt-4-1106-preview",
"gpt-4-vision-preview",
"gpt-4",
"gpt-4-0314",
"gpt-4-0613",
"gpt-4-32k",
"gpt-4-32k-0314",
"gpt-4-32k-0613",
"gpt-3.5-turbo",
"gpt-3.5-turbo-16k",
"gpt-3.5-turbo-0613",
"gpt-3.5-turbo-1106",
"gpt-3.5-turbo-0125",
"gpt-3.5-turbo-16k-0613",
]
x-oaiTypeLabel: string
name: name:
description: *assistant_name_param_description description: *assistant_name_param_description
type: string type: string
@@ -10370,34 +10297,7 @@ components:
description: The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run. description: The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run.
type: string type: string
model: model:
description: The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. $ref: "#/components/schemas/ChatModel"
example: "gpt-4-turbo"
anyOf:
- type: string
- type: string
enum:
[
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
"gpt-4-turbo-preview",
"gpt-4-1106-preview",
"gpt-4-vision-preview",
"gpt-4",
"gpt-4-0314",
"gpt-4-0613",
"gpt-4-32k",
"gpt-4-32k-0314",
"gpt-4-32k-0613",
"gpt-3.5-turbo",
"gpt-3.5-turbo-16k",
"gpt-3.5-turbo-0613",
"gpt-3.5-turbo-1106",
"gpt-3.5-turbo-0125",
"gpt-3.5-turbo-16k-0613",
]
x-oaiTypeLabel: string
nullable: true
instructions: instructions:
description: Overrides the [instructions](/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis. description: Overrides the [instructions](/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis.
type: string type: string
@@ -10562,7 +10462,35 @@ components:
- id - id
- type - type
- function - function
ChatModel:
description: The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.
example: "gpt-4-turbo"
x-speakeasy-unknown-values: allow
schema:
type: string
enum:
[
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
"gpt-4-turbo-preview",
"gpt-4-1106-preview",
"gpt-4-vision-preview",
"gpt-4",
"gpt-4-0314",
"gpt-4-0613",
"gpt-4-32k",
"gpt-4-32k-0314",
"gpt-4-32k-0613",
"gpt-3.5-turbo",
"gpt-3.5-turbo-16k",
"gpt-3.5-turbo-0613",
"gpt-3.5-turbo-1106",
"gpt-3.5-turbo-0125",
"gpt-3.5-turbo-16k-0613",
]
x-oaiTypeLabel: string
nullable: true
CreateThreadAndRunRequest: CreateThreadAndRunRequest:
type: object type: object
additionalProperties: false additionalProperties: false
@@ -10574,34 +10502,7 @@ components:
$ref: "#/components/schemas/CreateThreadRequest" $ref: "#/components/schemas/CreateThreadRequest"
description: If no thread is provided, an empty thread will be created. description: If no thread is provided, an empty thread will be created.
model: model:
description: The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. $ref: "#/components/schemas/ChatModel"
example: "gpt-4-turbo"
anyOf:
- type: string
- type: string
enum:
[
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
"gpt-4-turbo-preview",
"gpt-4-1106-preview",
"gpt-4-vision-preview",
"gpt-4",
"gpt-4-0314",
"gpt-4-0613",
"gpt-4-32k",
"gpt-4-32k-0314",
"gpt-4-32k-0613",
"gpt-3.5-turbo",
"gpt-3.5-turbo-16k",
"gpt-3.5-turbo-0613",
"gpt-3.5-turbo-1106",
"gpt-3.5-turbo-0125",
"gpt-3.5-turbo-16k-0613",
]
x-oaiTypeLabel: string
nullable: true
instructions: instructions:
description: Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis. description: Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis.
type: string type: string
@@ -10949,9 +10850,7 @@ components:
type: integer type: integer
nullable: true nullable: true
role: role:
description: The entity that produced the message. One of `user` or `assistant`. $ref: "#/components/schemas/ChatCompletionRole"
type: string
enum: ["user", "assistant"]
content: content:
description: The content of the message in array of text and/or images. description: The content of the message in array of text and/or images.
type: array type: array
@@ -11049,9 +10948,7 @@ components:
type: object type: object
properties: properties:
role: role:
description: The entity that produced the message. One of `user` or `assistant`. $ref: "#/components/schemas/ChatCompletionRole"
type: string
enum: ["user", "assistant"]
content: content:
description: The content of the message in array of text and/or images. description: The content of the message in array of text and/or images.
type: array type: array
@@ -11090,12 +10987,7 @@ components:
- content - content
properties: properties:
role: role:
type: string $ref: "#/components/schemas/ChatCompletionRole"
enum: ["user", "assistant"]
description: |
The role of the entity that is creating the message. Allowed values include:
- `user`: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages.
- `assistant`: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation.
content: content:
type: string type: string
minLength: 1 minLength: 1