Skip to content

Commit 9ac3029

Browse files
authored
Extract ChatCompletionTokenLogprob schema (#144)
1 parent b5fdca6 commit 9ac3029

File tree

1 file changed

+35
-32
lines changed

1 file changed

+35
-32
lines changed

openapi.yaml

Lines changed: 35 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6299,38 +6299,7 @@ components:
62996299
description: A list of message content tokens with log probability information.
63006300
type: array
63016301
items:
6302-
type: object
6303-
properties:
6304-
token: &chat_completion_response_logprobs_token
6305-
description: The token.
6306-
type: string
6307-
logprob: &chat_completion_response_logprobs_token_logprob
6308-
description: The log probability of this token.
6309-
type: number
6310-
bytes: &chat_completion_response_logprobs_bytes
6311-
description: A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.
6312-
type: array
6313-
items:
6314-
type: integer
6315-
nullable: true
6316-
top_logprobs:
6317-
description: List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.
6318-
type: array
6319-
items:
6320-
type: object
6321-
properties:
6322-
token: *chat_completion_response_logprobs_token
6323-
logprob: *chat_completion_response_logprobs_token_logprob
6324-
bytes: *chat_completion_response_logprobs_bytes
6325-
required:
6326-
- token
6327-
- logprob
6328-
- bytes
6329-
required:
6330-
- token
6331-
- logprob
6332-
- bytes
6333-
- top_logprobs
6302+
$ref: '#/components/schemas/ChatCompletionTokenLogprob'
63346303
nullable: true
63356304
required:
63366305
- content
@@ -6421,6 +6390,40 @@ components:
64216390
group: chat
64226391
example: *chat_completion_function_example
64236392

6393+
ChatCompletionTokenLogprob:
6394+
type: object
6395+
properties:
6396+
token: &chat_completion_response_logprobs_token
6397+
description: The token.
6398+
type: string
6399+
logprob: &chat_completion_response_logprobs_token_logprob
6400+
description: The log probability of this token.
6401+
type: number
6402+
bytes: &chat_completion_response_logprobs_bytes
6403+
description: A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.
6404+
type: array
6405+
items:
6406+
type: integer
6407+
nullable: true
6408+
top_logprobs:
6409+
description: List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.
6410+
type: array
6411+
items:
6412+
type: object
6413+
properties:
6414+
token: *chat_completion_response_logprobs_token
6415+
logprob: *chat_completion_response_logprobs_token_logprob
6416+
bytes: *chat_completion_response_logprobs_bytes
6417+
required:
6418+
- token
6419+
- logprob
6420+
- bytes
6421+
required:
6422+
- token
6423+
- logprob
6424+
- bytes
6425+
- top_logprobs
6426+
64246427
ListPaginatedFineTuningJobsResponse:
64256428
type: object
64266429
properties:

0 commit comments

Comments
 (0)