Pinecone TypeScript SDK - v8.1.0
    Preparing search index...

    Class ChatStream<Item>

    Implements an async iterable that processes the readable stream of an assistant chat response.

    This class expects each chunk of data in the stream to begin with data: and be followed by a valid chunk of JSON. If a chunk contains malformed JSON, it is skipped, and a debug message is logged.

    Type Parameters

    • Item

      The type of items yielded by the iterable.

    Implements

    • AsyncIterable<Item>
    Index