vectara / stream-query-client

A TypeScript utility for easily making requests/parsing responses to/from Vectara's streaming query API
Apache License 2.0
3 stars 0 forks source link

fix: Use optional chaining when retrieving chat details #5

Closed mrderyk closed 4 months ago

mrderyk commented 4 months ago

CONTEXT

When dealing with responses that have no chat property, stream data parser throws an error. In order to fix this we'll need to do an early return of null when attempting to parse non-existent chat data.

CHANGES