export class ChatMessageBuilder {
    static system(content) {
        return {
            role: 'system',
            content,
        };
    }
    static functionCall(funcName, params) {
        if (params === undefined || params === null) {
            params = {};
        }
        return {
            role: 'assistant',
            content: '',
            function_call: {
                name: funcName,
                arguments: typeof params === 'string' ? params : JSON.stringify(params),
            },
        };
    }
    static functionCallResult(funcName, result) {
        return {
            role: 'function',
            name: funcName,
            content: result,
        };
    }
    static toolCall(toolId, funcName, params) {
        if (params === undefined || params === null) {
            params = {};
        }
        return {
            role: 'assistant',
            content: null,
            tool_calls: [
                {
                    id: toolId,
                    type: 'function',
                    function: {
                        name: funcName,
                        arguments: typeof params === 'string' ? params : JSON.stringify(params),
                    },
                },
            ],
        };
    }
    static toolCallResult(toolId, result) {
        return {
            tool_call_id: toolId,
            role: 'tool',
            content: result,
        };
    }
}
