Skip to content

Commit

Permalink
Mark all properties in "choices" as required
Browse files Browse the repository at this point in the history
I'm not sure whether this is actually the case (please decline the PR if not!) but I would expect all keys of this object to be present in all responses (though of course logprobs is marked as sometimes having a `null` value).

Making this change would enable nicer types, eg, `response.choices[0].text.length` rather than `response.choices[0].text?.length`
  • Loading branch information
rattrayalex committed Jun 15, 2023
1 parent 0c901d9 commit 8809e20
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2261,6 +2261,11 @@ components:
type: array
items:
type: object
required:
- text
- index
- logprobs
- finish_reason
properties:
text:
type: string
Expand Down

0 comments on commit 8809e20

Please sign in to comment.