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

    Interface ContextOptions

    Parameters to retrieve context from an assistant.

    interface ContextOptions {
        filter?: object;
        includeBinaryContent?: boolean;
        messages?: MessagesModel;
        multimodal?: boolean;
        query?: string;
        snippetSize?: number;
        topK?: number;
    }
    Index
    filter?: object

    Optionally filter which documents can be retrieved using the following metadata fields.

    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 context snippet size. Default is 2048 tokens. Minimum is 512 tokens. Maximum is 8192 tokens.

    topK?: number

    The maximum number of context snippets to return. Default is 16. Maximum is 64.