@promptbook/templates
Version:
Promptbook: Run AI apps in plain human language across multiple models and platforms
40 lines (39 loc) • 1.5 kB
TypeScript
import type { string_url_image } from '../../types/typeAliases';
/**
* Extracts profile image URL from agent definition text and returns cleaned system message
* @param systemMessage The original system message that may contain META IMAGE line
* @returns Object with profileImageUrl (if found) and cleanedSystemMessage (without META IMAGE line)
*
* @private - TODO: [🧠] Maybe should be public?
*/
export declare function extractProfileImageFromSystemMessage(systemMessage: string): {
profileImageUrl?: string_url_image;
cleanedSystemMessage: string;
};
/**
* Extracts persona, examples, and profile image from agent definition text
* @param systemMessage The original system message that may contain PERSONA, EXAMPLE, and META IMAGE lines
* @returns Object with extracted information and cleaned system message
*
* @private - TODO: [🧠] Maybe should be public?
*/
export declare function extractAgentMetadata(systemMessage: string): {
persona?: {
name: string;
description?: string;
};
examples: string[];
profileImageUrl?: string_url_image;
cleanedSystemMessage: string;
};
/**
* Generates a gravatar URL based on agent name for fallback avatar
* @param name The agent name to generate avatar for
* @returns Gravatar URL
*
* @private - TODO: [🧠] Maybe should be public?
*/
export declare function generateGravatarUrl(name?: string | null): string;
/**
* Note: [💞] Ignore a discrepancy between file name and entity name
*/