Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 1.75 KB

File metadata and controls

43 lines (31 loc) · 1.75 KB

@adminforth/completion-adapter-anthropic-messages

License: MIT Build Status npm downloads npm version

Ask AI

AdminForth completion adapter for the Anthropic Messages API.

Installation

pnpm i @adminforth/completion-adapter-anthropic-messages

Usage

import CompletionAdapterAntropicMessages from "@adminforth/completion-adapter-anthropic-messages";

const adapter = new CompletionAdapterAntropicMessages({
	anthropicApiKey: process.env.ANTHROPIC_API_KEY as string,
	model: "claude-sonnet-4-5-20250929",
	extraRequestBodyParameters: {
		temperature: 0.7,
	},
});

The adapter supports:

  • regular text completion
  • JSON Schema structured output via the Messages parse helper
  • tool calls
  • streaming output chunks
  • extended thinking when the token budget allows it

Related links