UNPKG

@promptbook/utils

Version:

Promptbook: Run AI apps in plain human language across multiple models and platforms

57 lines (56 loc) 3.3 kB
import type { BookCommitment } from './_base/BookCommitment'; import type { CommitmentDefinition } from './_base/CommitmentDefinition'; import { ActionCommitmentDefinition } from './ACTION/ACTION'; import { FormatCommitmentDefinition } from './FORMAT/FORMAT'; import { KnowledgeCommitmentDefinition } from './KNOWLEDGE/KNOWLEDGE'; import { MetaImageCommitmentDefinition } from './META_IMAGE/META_IMAGE'; import { MetaLinkCommitmentDefinition } from './META_LINK/META_LINK'; import { ModelCommitmentDefinition } from './MODEL/MODEL'; import { NoteCommitmentDefinition } from './NOTE/NOTE'; import { PersonaCommitmentDefinition } from './PERSONA/PERSONA'; import { RuleCommitmentDefinition } from './RULE/RULE'; import { SampleCommitmentDefinition } from './SAMPLE/SAMPLE'; import { StyleCommitmentDefinition } from './STYLE/STYLE'; import { NotYetImplementedCommitmentDefinition } from './_base/NotYetImplementedCommitmentDefinition'; /** * Registry of all available commitment definitions * This array contains instances of all commitment definitions * This is the single source of truth for all commitments in the system * * @private Use functions to access commitments instead of this array directly */ export declare const COMMITMENT_REGISTRY: readonly [PersonaCommitmentDefinition, KnowledgeCommitmentDefinition, StyleCommitmentDefinition, RuleCommitmentDefinition, RuleCommitmentDefinition, SampleCommitmentDefinition, SampleCommitmentDefinition, FormatCommitmentDefinition, ModelCommitmentDefinition, ActionCommitmentDefinition, MetaImageCommitmentDefinition, MetaLinkCommitmentDefinition, NoteCommitmentDefinition, NotYetImplementedCommitmentDefinition<"EXPECT">, NotYetImplementedCommitmentDefinition<"SCENARIO">, NotYetImplementedCommitmentDefinition<"SCENARIOS">, NotYetImplementedCommitmentDefinition<"BEHAVIOUR">, NotYetImplementedCommitmentDefinition<"BEHAVIOURS">, NotYetImplementedCommitmentDefinition<"AVOID">, NotYetImplementedCommitmentDefinition<"AVOIDANCE">, NotYetImplementedCommitmentDefinition<"GOAL">, NotYetImplementedCommitmentDefinition<"GOALS">, NotYetImplementedCommitmentDefinition<"CONTEXT">]; /** * Gets a commitment definition by its type * @param type The commitment type to look up * @returns The commitment definition or null if not found * * @public exported from `@promptbook/core` */ export declare function getCommitmentDefinition(type: BookCommitment): CommitmentDefinition | null; /** * Gets all available commitment definitions * @returns Array of all commitment definitions * * @public exported from `@promptbook/core` */ export declare function getAllCommitmentDefinitions(): ReadonlyArray<CommitmentDefinition>; /** * Gets all available commitment types * @returns Array of all commitment types * * @public exported from `@promptbook/core` */ export declare function getAllCommitmentTypes(): ReadonlyArray<BookCommitment>; /** * Checks if a commitment type is supported * @param type The commitment type to check * @returns True if the commitment type is supported * * @public exported from `@promptbook/core` */ export declare function isCommitmentSupported(type: BookCommitment): boolean; /** * TODO: !!!! Maybe create through standardized $register * Note: [💞] Ignore a discrepancy between file name and entity name */