UNPKG

generator-begcode

Version:

Spring Boot + Angular/React/Vue in one handy generator

11 lines (10 loc) 618 B
import { trimText } from '../../agent-core/index.js'; export const FUNCTION_CALL_SUCCESS_CONTENT = (fnName, params, result) => '### Function Call:\n' + '```javascript\n' + `${fnName}(${JSON.stringify(params, null, 2)})\n` + '```\n' + '### Result\n' + '```\n' + `${result}\n` + '```'; export const FUNCTION_CALL_FAILED = (params, name, error) => `The function '${name}' failed, this is the error:\n\`\`\`\n${error && typeof error === 'string' ? trimText(error, 300) : trimText(JSON.stringify(error, null, 2), 300)}\n\`\`\`\n\nArguments:\n\`\`\`\n${JSON.stringify(params, null, 2)}\n\`\`\``;