Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding 'model' property to ChatCompletions. #28554

Merged
merged 4 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ model ChatChoice {
finishReason: CompletionsFinishReason | null;

// Note: this property is currently speculative via observation and not yet documented anywhere.

@doc("""
The reason the model stopped generating tokens, together with any applicable details.
This structured representation replaces 'finish_reason' for some models.
Expand Down Expand Up @@ -303,6 +304,9 @@ model ChatCompletions {
""")
choices: ChatChoice[];

@doc("The model name used for this completions request.")
`model`?: string;

@doc("""
Content filtering results for zero or more prompts in the request. In a streaming request,
results for different prompts may arrive at different times or in different orders.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,10 @@
},
"x-ms-identifiers": []
},
"model": {
"type": "string",
"description": "The model name used for this completions request."
},
"prompt_filter_results": {
"type": "array",
"description": "Content filtering results for zero or more prompts in the request. In a streaming request,\nresults for different prompts may arrive at different times or in different orders.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,10 @@
},
"x-ms-identifiers": []
},
"model": {
"type": "string",
"description": "The model name used for this completions request."
},
"prompt_filter_results": {
"type": "array",
"description": "Content filtering results for zero or more prompts in the request. In a streaming request,\nresults for different prompts may arrive at different times or in different orders.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1795,6 +1795,10 @@
},
"x-ms-identifiers": []
},
"model": {
"type": "string",
"description": "The model name used for this completions request."
},
"prompt_filter_results": {
"type": "array",
"description": "Content filtering results for zero or more prompts in the request. In a streaming request,\nresults for different prompts may arrive at different times or in different orders.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1795,6 +1795,10 @@
},
"x-ms-identifiers": []
},
"model": {
"type": "string",
"description": "The model name used for this completions request."
},
"prompt_filter_results": {
"type": "array",
"description": "Content filtering results for zero or more prompts in the request. In a streaming request,\nresults for different prompts may arrive at different times or in different orders.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,10 @@
},
"x-ms-identifiers": []
},
"model": {
"type": "string",
"description": "The model name used for this completions request."
},
"usage": {
"$ref": "#/definitions/CompletionsUsage",
"description": "Usage information for tokens processed and generated as part of this completions operation."
Expand Down