anthropic
Implementation of the Anthropic Messages API. There is no default interpreter because this plugin requires API credentials.
Use anthropic in your app and provide a configured interpreter at runtime.
import { anthropic, wrapAnthropicSdk, createAnthropicInterpreter } from "@mvfm/plugin-anthropic";
import Anthropic from "@anthropic-ai/sdk";
// 1. Create an Anthropic SDK client
const sdk = new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY });
const client = wrapAnthropicSdk(sdk);
// 2. Build the interpreter
const anthropicInterp = createAnthropicInterpreter(client);
// 3. Merge and run
const app = mvfm(prelude, anthropic);
const baseInterp = defaults(app, { anthropic: anthropicInterp });
await fold(baseInterp, prog);