eah-langflow-fetch
v0.0.2
Published
Minimal npm client for running a Langflow flow and extracting the text output.
Readme
eah-langflow-fetch
一个最小化的 npm 包,用来调用 Langflow /api/v1/run/:flowId 接口,并从返回结构中提取最终的 text 字段。
安装
npm install eah-langflow-fetch如果只是本地验证,也可以在当前目录执行:
npm pack用法
const { getConfig } = require("eah-langflow-fetch");
async function main() {
const result = await getConfig(
"da41700b-2067-4110-8dc2-6b1ebf6d93db",
"your-api-key",
);
console.log(result.text);
}
main().catch(console.error);默认返回:
{
text: '{\n "foo":"111"\n}'
}