llmesh / anthropic
Anthropic provider for LLMesh AI library
dev-main
2026-06-07 04:55 UTC
Requires
- php: ^8.1
- llmesh/core: dev-main || ^0.1
Requires (Dev)
- phpunit/phpunit: ^12.0
This package is auto-updated.
Last update: 2026-06-07 04:55:55 UTC
README
An Anthropic provider adapter for the LLMesh Core framework, allowing you to use Anthropic Claude models seamlessly with a unified API.
Installation
Install via Composer:
composer require llmesh/anthropic
Quick Start
use LLMesh\Anthropic\AnthropicProvider; use LLMesh\Core\LLMesh; use LLMesh\Core\Generators\GenerateTextOptions; $provider = new AnthropicProvider(getenv('ANTHROPIC_API_KEY')); // Simple Text Generation $response = LLMesh::generateText( $provider, GenerateTextOptions::make()->withPrompt('Say hello!') ); echo $response->getText();
Supported Capabilities
- Chat Completions: standard, streaming, and tool calls using models like
claude-sonnet-4-5,claude-opus-4-5, andclaude-haiku-3-5. - Structured Outputs: validated object generation via native tool mode.