@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

    • BaseAiKnowledgeBaseContextRequest
      • AiKnowledgeBaseTextContextRequest
    Index

    Properties

    contextId: string

    The id of the context

    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.

    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'.