@squidcloud/client
    Preparing search index...

    Interface AiKnowledgeBaseTextContextRequest

    Request structure for adding text-based context to an AI agent.

    interface AiKnowledgeBaseTextContextRequest {
        contextId?: string;
        extractImages?: boolean;
        format?: AiKnowledgeBaseTextFormat;
        imageExtractionModel?: AiChatModelSelection;
        imageMinSizePixels?: number;
        metadata?: AiContextMetadata;
        options?: AiKnowledgeBaseContextTextOptions;
        text: string;
        title: string;
        type: "text";
    }

    Hierarchy (View Summary)

    Index

    Properties

    contextId?: string

    The id of the context. Optional: when omitted, the server generates one and rejects the upload if another context in the knowledge base already holds identical content (content-level dedup). Provide an explicit id to address a specific context — that overwrites it unconditionally and allows duplicate content across different ids.

    extractImages?: boolean

    Whether to extract images embedded in markdown/HTML text. Defaults to false.

    When true and the text is detected as (or declared to be) markdown/HTML, image references inside the text (![alt](url) or <img src="...">) are fetched, stored, and have descriptions generated just like images extracted from a PDF.

    Has no effect for plain text.

    Hint about the format of the text. If omitted (or 'auto'), the format is sniffed from the content. Only 'markdown' and 'html' (or 'auto' with content that looks like markdown/HTML) participate in image extraction when extractImages is true.

    imageExtractionModel?: AiChatModelSelection

    The AI model to use for generating image descriptions, if specified.

    imageMinSizePixels?: number

    Minimum width/height (in pixels) for an image to be kept. Smaller images are skipped.

    Optional metadata associated with the context item.

    General options for how to process the text.

    text: string

    The text content to add to the context.

    title: string

    A title for the text context.

    type: "text"

    Specifies the context type as 'text'.