praval.providers.anthropic๏
Anthropic provider implementation for Praval framework.
Provides integration with Anthropicโs Claude models through the Messages API with support for conversation history and system messages.
Classes
|
Anthropic provider for LLM interactions. |
- class praval.providers.anthropic.AnthropicProvider(config)[source]๏
Bases:
objectAnthropic provider for LLM interactions.
Handles communication with Anthropicโs Claude models through the Messages API with proper system message handling.
- __init__(config)[source]๏
Initialize Anthropic provider.
- Parameters:
config โ AgentConfig object with provider settings
- Raises:
ProviderError โ If Anthropic client initialization fails
- generate(messages, tools=None)[source]๏
Generate a response using Anthropicโs Messages API.
- Parameters:
- Return type:
- Returns:
Generated response as a string
- Raises:
ProviderError โ If API call fails