Interface PromptComponents

Core components that form the foundation of any prompt construction. These are gathered from various sources (GMI state, user input, RAG) and then augmented with dynamically selected contextual elements. PromptComponents

interface PromptComponents {
    systemPrompts?: {
        content: string;
        priority?: number;
        source?: string;
    }[];
    conversationHistory?: ConversationMessage[];
    userInput?: null | string;
    visionInputs?: VisionInputData[];
    audioInput?: AudioInputData;
    tools?: ITool<any, any>[];
    toolSchemas?: Record<string, unknown>[];
    retrievedContext?: string | {
        source: string;
        content: string;
        relevance?: number;
        type?: string;
    }[];
    taskSpecificData?: Record<string, unknown>;
    customComponents?: Record<string, unknown>;
}

Properties

systemPrompts?: {
    content: string;
    priority?: number;
    source?: string;
}[]

System-level prompts with optional priority ordering. Higher priority usually means placed earlier or given more weight.

Type declaration

  • content: string
  • Optional priority?: number
  • Optional source?: string
conversationHistory?: ConversationMessage[]

Conversation history messages, typically an array of Message objects.

userInput?: null | string

Current user input text.

visionInputs?: VisionInputData[]

Visual inputs (images) if the target model supports vision.

audioInput?: AudioInputData

Audio input data references if the model or a pre-processing step handles audio.

tools?: ITool<any, any>[]

Available tools and their schemas, for models that support function/tool calling.

toolSchemas?: Record<string, unknown>[]

Pre-formatted tool/function schemas that should be forwarded to the model as-is. Useful when upstream logic has already normalized the schema definitions.

retrievedContext?: string | {
    source: string;
    content: string;
    relevance?: number;
    type?: string;
}[]

Retrieved context from a RAG system, to be incorporated into the prompt.

taskSpecificData?: Record<string, unknown>

Task-specific data or parameters that need to be included in the prompt.

customComponents?: Record<string, unknown>

Additional custom components that templates might use.