Theia API Documentation v1.65.0
    Preparing search index...

    Registry for managing language model aliases.

    interface LanguageModelAliasRegistry {
        onDidChange: Event<void>;
        ready: Promise<void>;
        addAlias(alias: LanguageModelAlias): void;
        getAliases(): LanguageModelAlias[];
        removeAlias(id: string): void;
        resolveAlias(id: string): undefined | string[];
    }

    Implemented by

    Index

    Properties

    onDidChange: Event<void>

    Event that is fired when the alias list changes.

    ready: Promise<void>

    Promise that resolves when the registry is ready for use (preferences loaded).

    Methods

    • Resolve an alias or model id to a prioritized list of model ids. If the id is not an alias, returns [id]. If the alias exists and has a selectedModelId, returns [selectedModelId]. If the alias exists and has no selectedModelId, returns defaultModelIds. If the alias does not exist, returns undefined.

      Parameters

      • id: string

      Returns undefined | string[]