UNPKG

floomai

Version:

Floom orchestrates & executes Generative AI pipelines, Empowering Developers and DevOps to focus on what matters.

78 lines (52 loc) 2.08 kB
# FloomSDK for Node.js FloomSDK is a powerful Node.js client designed to simplify integrating Floom's Generative AI capabilities into your Node.js or TypeScript applications. This SDK provides an easy-to-use interface for interacting with Floom's API, enabling developers to focus on creating innovative applications without worrying about the underlying API calls. ## Features - **Easy Integration**: Quickly add Floom's Generative AI features to your projects. - **TypeScript Support**: Comes with TypeScript definitions for better development experience. - **Flexible**: Use with both JavaScript and TypeScript projects. ## Getting Started ### Prerequisites - Node.js (version 12.x or newer) - An API key from Floom ### Installation Install FloomSDK using npm: ```bash npm install floomai ``` Or using yarn: ```bash yarn add floomai ``` ### Basic Usage Here's how you can get started with the FloomSDK in your Node.js or TypeScript project: ```javascript const { FloomClient, DataTransferType } = require('floomai'); const main = async () => { const floomClient = new FloomClient( "floom-endpoint", "api-key" ); try { const response = await floomClient.run( "pipeline-idm-docs1", "", "How do I reset the oil alert in my dashboard?", null, DataTransferType.Base64 ); if(response.values) { console.log('Floom response:', response.values[0].value); } } catch (error) { console.error('An error occurred connecting to Floom:', error); } }; main(); ``` ## Documentation For detailed documentation and API references, visit [Floom Documentation](https://floom.ai/docs). ## Support and Contributions If you encounter any issues or require assistance, please file an issue on our [GitHub issues page](https://github.com/FloomAI/FloomSDK-NodeJS/issues). Contributions are welcome! If you'd like to contribute, please fork the repository and submit a pull request. ## License FloomSDK is [MIT licensed](./LICENSE).