Skip to content

interfaces: mark optional response fields#263

Open
BruceMacD wants to merge 1 commit intomainfrom
brucemacd/optional-response-fields
Open

interfaces: mark optional response fields#263
BruceMacD wants to merge 1 commit intomainfrom
brucemacd/optional-response-fields

Conversation

@BruceMacD
Copy link
Member

These fields will only be present on some responses, such as the final response in the stream or a remote model response.

resolves #262

These fields will only be present on some responses, such as the final response in the stream or a remote model response.
Copy link
Member

@jmorganca jmorganca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know what the cause is for these CI warnings?

@hopperelec
Copy link
Contributor

Could it be better to be more explicit and have two interfaces PartialChatResponse and DoneChatResponse? That way, the developer can use done for type-checking of all the other properties, rather than having to check individually for each one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ChatResponse TypeScript interface is declared wrong?

3 participants