@schift-io/workflow-vercel-ai
v0.1.3
Published
Project Schift Workflow v2 YAML artifacts into Vercel AI SDK call options.
Maintainers
Readme
@schift-io/workflow-vercel-ai
Project one Schift Workflow v2 llm_generate block into Vercel AI SDK call
options.
asVercelAI() is a single-block adapter. It does not execute the full Workflow
v2 graph, traverse edges, or run upstream retrieval/transform blocks. For full
graph execution, run the artifact through the local Schift SDK runtime with
workflow.run() / workflow.stream() from @schift-io/sdk; use the hosted API
only when you intentionally persist and publish a workflow.
import { generateText } from "ai";
import { Schift } from "@schift-io/sdk";
import { asVercelAI } from "@schift-io/workflow-vercel-ai";
const schift = new Schift({ apiKey: process.env.SCHIFT_API_KEY! });
const wf = schift.workflow({ yaml });
const result = await generateText(
await asVercelAI(wf, { mode: "generateText", entry: "answer" }),
);The ai package is a peer dependency and is not bundled by this adapter.
