AI Agents and Workflows for Flatfile
This repo contains a collection of AI Agents and Workflows for building in Flatfile.
Usage
Install
npm install @flatfile/ai-agents
Import
Update the .env
file with keys for your OpenAI, Anthropic, and XAI models and select the model you want to use.
import { blueprintWorkflow } from '@flatfile/ai-agents'
const csv = `first_name, last_name, email, phone, address, city, state, zip_code
John,Doe,john.doe@example.com,123-456-7890,123 Main St,Anytown,CA,12345`
const blueprint = await blueprintWorkflow('gpt-4o', csv)
console.log(blueprint)
Publish
To publish the package, follow these steps:
-
Install dependencies: Install all required dependencies:
npm install
-
Build the package: Ensure that the package is built by running the following command:
npm run build
-
Run CI checks: Before publishing, make sure all CI checks pass. This includes building, checking format, checking exports, linting, and testing:
npm run ci
-
Create a changeset: If you haven't already, create a changeset to document the changes in this release:
npm run changeset
-
Version the package: Update the version based on the changeset:
npm run local-release
-
Publish the package: The prepublishOnly
script ensures that all CI checks are run before publishing. To publish the package, use:
npm publish
Make sure you have the necessary permissions to publish the package to the registry.