dllmforge.anthropic_api

Classes

AnthropicAPI([api_key, model, ...])

Class to interact with Anthropic's Claude API.

class dllmforge.anthropic_api.AnthropicAPI(api_key=None, model='claude-3-7-sonnet-20250219', deployment_claude37=None, deployment_claude35=None)[source]

Class to interact with Anthropic’s Claude API.

Initialize the Anthropic API client with configuration.

__init__(api_key=None, model='claude-3-7-sonnet-20250219', deployment_claude37=None, deployment_claude35=None)[source]

Initialize the Anthropic API client with configuration.

check_server_status()[source]

Check if the Anthropic API service is accessible.

list_available_models()[source]

List available models from Anthropic.

send_test_message(prompt='Hello, how are you?')[source]

Send a test message to the model and get a response.

chat_completion(messages, temperature=0.7, max_tokens=1000)[source]

Get a chat completion from the model.