6e8a0b9d4af3c41f1bb3309cc43eb52fbd805f847d73863736d6692cd0d9bfd9.json 2.7 KB

1
  1. {"ast":null,"code":"import _asyncToGenerator from \"F:/workspace/202226701027/huinongbao-app/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\n// Default generic \"any\" values are for backwards compatibility.\n// Replace with \"string\" when we are comfortable with a breaking change.\nimport { StringPromptValue } from \"../prompt_values.js\";\nimport { BasePromptTemplate } from \"./base.js\";\n/**\n * Base class for string prompt templates. It extends the\n * BasePromptTemplate class and overrides the formatPromptValue method to\n * return a StringPromptValue.\n */\nexport class BaseStringPromptTemplate extends BasePromptTemplate {\n /**\n * Formats the prompt given the input values and returns a formatted\n * prompt value.\n * @param values The input values to format the prompt.\n * @returns A Promise that resolves to a formatted prompt value.\n */\n formatPromptValue(values) {\n var _this = this;\n return _asyncToGenerator(function* () {\n const formattedPrompt = yield _this.format(values);\n return new StringPromptValue(formattedPrompt);\n })();\n }\n}","map":{"version":3,"names":["StringPromptValue","BasePromptTemplate","BaseStringPromptTemplate","formatPromptValue","values","_this","_asyncToGenerator","formattedPrompt","format"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@langchain/core/dist/prompts/string.js"],"sourcesContent":["// Default generic \"any\" values are for backwards compatibility.\n// Replace with \"string\" when we are comfortable with a breaking change.\nimport { StringPromptValue, } from \"../prompt_values.js\";\nimport { BasePromptTemplate } from \"./base.js\";\n/**\n * Base class for string prompt templates. It extends the\n * BasePromptTemplate class and overrides the formatPromptValue method to\n * return a StringPromptValue.\n */\nexport class BaseStringPromptTemplate extends BasePromptTemplate {\n /**\n * Formats the prompt given the input values and returns a formatted\n * prompt value.\n * @param values The input values to format the prompt.\n * @returns A Promise that resolves to a formatted prompt value.\n */\n async formatPromptValue(values) {\n const formattedPrompt = await this.format(values);\n return new StringPromptValue(formattedPrompt);\n }\n}\n"],"mappings":";AAAA;AACA;AACA,SAASA,iBAAiB,QAAS,qBAAqB;AACxD,SAASC,kBAAkB,QAAQ,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,wBAAwB,SAASD,kBAAkB,CAAC;EAC7D;AACJ;AACA;AACA;AACA;AACA;EACUE,iBAAiBA,CAACC,MAAM,EAAE;IAAA,IAAAC,KAAA;IAAA,OAAAC,iBAAA;MAC5B,MAAMC,eAAe,SAASF,KAAI,CAACG,MAAM,CAACJ,MAAM,CAAC;MACjD,OAAO,IAAIJ,iBAAiB,CAACO,eAAe,CAAC;IAAC;EAClD;AACJ","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}