Pinecone TypeScript SDK - v9.0.0
    Preparing search index...

    Interface ContextOptions

    Parameters to retrieve context from an assistant.

    import type { ContextOptions } from '@pinecone-database/pinecone';
    const options: ContextOptions = { query: 'How do I return an order?' };
    interface ContextOptions {
        filter?: object;
        includeBinaryContent?: boolean;
        messages?: MessagesModel;
        multimodal?: boolean;
        query?: string;
        snippetSize?: number;
        topK?: number;
    }
    Index
    filter?: object

    Filter the files used for retrieval by metadata, such as { category: 'returns' }.

    includeBinaryContent?: boolean

    If image-related context snippets are returned, this field determines whether or not they should include base64 image data. If false, only the image captions are returned. Only available when multimodal=true.

    messages?: MessagesModel

    The list of messages to use for generating the context. Exactly one of query or messages should be provided.

    multimodal?: boolean

    Whether or not to retrieve image-related context snippets. If false, only text snippets are returned.

    query?: string

    The query that is used to generate the context. Exactly one of query or messages should be provided.

    snippetSize?: number

    The maximum size of each context snippet, in tokens; omit to use the service default.

    topK?: number

    The maximum number of context snippets to return; omit to use the service default.