@servicenow/sdk - v4.7.0
    Preparing search index...

    Interface ProviderPromptConfig<TInputs, TTools, TProvider>

    Provider configuration with its prompts Maps to sys_one_extend_capability_definition Generic over TInputs and TTools to enable type-safe filterCondition and prompt builder

    interface ProviderPromptConfig<
        TInputs extends readonly InputAttribute[] = readonly InputAttribute[],
        TTools extends
            Record<string, BaseToolHandle> = Record<string, BaseToolHandle>,
        TProvider extends string = string,
    > {
        defaultPrompt?: string;
        defaultPromptVersion?: number;
        prompts: PromptSettings<TInputs, TTools, TProvider>[];
        provider: KnownProvider;
        providerAPI?: ProviderFlowAPI;
    }

    Type Parameters

    Index

    Properties

    defaultPrompt?: string

    Name of the default prompt within this provider (must match one prompt's name) If not specified, first prompt is default

    defaultPromptVersion?: number

    Default version number for the default prompt Specifies which version of the default prompt should be used

    1 or 2
    

    Array of prompts for this provider At least one prompt is required

    provider: KnownProvider

    Provider name - use known providers for autocomplete or provide custom name

    Known providers (with autocomplete):

    • 'Now LLM Service' - ServiceNow's default LLM provider
    • 'Azure OpenAI' - Microsoft Azure OpenAI
    • 'Open AI' - OpenAI direct
    • 'Google Gemini' - Google Gemini/Vertex AI
    • 'AWS Claude' - Amazon Bedrock (Anthropic Claude)
    • 'IBM Watson' - IBM watsonx
    • 'Perplexity' - Perplexity AI
    • 'Aleph Alpha' - Aleph Alpha

    Or provide any custom provider name as a string.

    If providerAPI is not specified, the system will look up the default flow implementation from PROVIDER_MAPPINGS based on this provider name.

    'Now LLM Service'
    
    'Azure OpenAI'
    
    'My Custom Provider'
    
    providerAPI?: ProviderFlowAPI

    Provider API configuration (optional)

    If not specified, the system will automatically look up the default flow implementation based on the provider name .

    Provide this when:

    • Using a custom provider
    • Overriding the default flow for a known provider
    • Specifying a non-default API for a provider (e.g., Azure OpenAI has multiple APIs)

    Maps to:

    • sys_one_extend_capability_definition.api (the flow_id)
    • sys_one_extend_capability_definition.api_type (the flow_type)
    // Omit for known providers
    provider: 'Now LLM Service'
    // providerAPI not needed
    // Object format for custom providers
    provider: 'My Custom LLM',
    providerAPI: {
    type: 'sys_hub_flow',
    id: 'my_flow_sys_id'
    }
    // String format (backward compatible - defaults to sys_hub_flow)
    // Use the sys_id of your flow from the instance
    providerAPI: '<your_flow_sys_id>'