UNPKG

pipelex

Version:

Node.js client for the Pipelex API - Pipelex is an open-source dev tool based on a simple declarative language that lets you define replicable, structured, composable LLM pipelines.

28 lines (27 loc) 719 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const index_1 = require("./index"); // Example usage async function runExample() { // Create a client instance const client = new index_1.PipelexClient({ apiKey: 'YOUR_API_KEY', }); try { // Example API call const result = await client.process({ text: 'Sample text to process', }, { modelName: 'default', maxLength: 100, }); console.log('API Response:', result); } catch (error) { console.error('Error:', error); } } // Only run if directly executed if (require.main === module) { runExample().catch(console.error); }