import { ChatMessageBuilder } from '../agent-core/index.js';
import { LlmAgentFunctionBase } from './utils/index.js';
export class AnalyzeFormattingRequirementsFunction extends LlmAgentFunctionBase {
    constructor(llm, tokenizer) {
        super(llm, tokenizer);
    }
    name = 'analyzeFormattingRequirements';
    description = 'Analyzes the requirements of a user defined goal';
    parameters = {
        type: 'object',
        properties: {
            goal: {
                type: 'string',
                description: "The user's goal",
            },
        },
        required: ['goal'],
        additionalProperties: false,
    };
    buildExecutor({ context, }) {
        return async (params, rawParams) => {
            const resp = await this.askLlm(`Given the following user goal, please identify any formatting requirements:\n\`\`\`\n${params.goal}\n\`\`\``);
            return {
                outputs: [],
                messages: [ChatMessageBuilder.functionCall(this.name, rawParams), ChatMessageBuilder.functionCallResult(this.name, resp)],
            };
        };
    }
}
