@promptbook/remote-client
Version:
Promptbook: Turn your company's scattered knowledge into AI ready books
55 lines (54 loc) • 1.65 kB
TypeScript
import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
/**
* MODEL commitment definition
*
* The MODEL commitment specifies which AI model to use and can also set
* model-specific parameters like temperature, topP, topK, and maxTokens.
*
* Supports multiple syntax variations:
*
* Single-line format:
* ```book
* MODEL gpt-4
* MODEL claude-3-opus temperature=0.3
* MODEL gpt-3.5-turbo temperature=0.8 topP=0.9
* ```
*
* Multi-line named parameter format:
* ```book
* MODEL NAME gpt-4
* MODEL TEMPERATURE 0.7
* MODEL TOP_P 0.9
* MODEL MAX_TOKENS 2048
* ```
*
* @private [🪔] Maybe export the commitments through some package
*/
export declare class ModelCommitmentDefinition extends BaseCommitmentDefinition<'MODEL' | 'MODELS'> {
constructor(type?: 'MODEL' | 'MODELS');
/**
* Short one-line description of MODEL.
*/
get description(): string;
/**
* Markdown documentation for MODEL commitment.
*/
get documentation(): string;
applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
/**
* Check if the first part is a known named parameter
*/
private isNamedParameter;
/**
* Parse the new named parameter format: "MODEL TEMPERATURE 0.7"
*/
private parseNamedParameter;
/**
* Parse the legacy format: "MODEL gpt-4 temperature=0.3 topP=0.9"
*/
private parseLegacyFormat;
}
/**
* Note: [💞] Ignore a discrepancy between file name and entity name
*/