An async iterable of assistant response chunks.
Obtain it from Assistant.chatStream or Assistant.chatCompletionStream; do not construct it directly. Unlike a complete chat response, it yields updates as they arrive.
import { Pinecone } from '@pinecone-database/pinecone';const pc = new Pinecone();const assistant = pc.assistant({ name: 'support-guide' });const stream = await assistant.chatStream({ messages: ['How do I return an order?'] });for await (const chunk of stream) console.log(chunk); Copy
import { Pinecone } from '@pinecone-database/pinecone';const pc = new Pinecone();const assistant = pc.assistant({ name: 'support-guide' });const stream = await assistant.chatStream({ messages: ['How do I return an order?'] });for await (const chunk of stream) console.log(chunk);
The response chunk yielded during iteration.
Iterates over response chunks as they arrive.
An iterator over the response chunks.
An async iterable of assistant response chunks.
Obtain it from Assistant.chatStream or Assistant.chatCompletionStream; do not construct it directly. Unlike a complete chat response, it yields updates as they arrive.
Example