claude_api_client
Claude API Client - Integrates with Anthropic’s Claude API for intelligent content generation
Functions
generate_sample_ai_content ()
|
Generate sample AI content for testing purposes |
load_dotenv ([dotenv_path, stream, verbose, ...])
|
Parse a .env file and then load all the variables found as environment variables. |
Classes
AIContentPrompts ()
|
Prompt templates for generating different types of content |
AIContentRequest (content_type, ...[, ...])
|
Request structure for AI content generation |
AIContentResponse (content_type, ...[, metadata])
|
Response structure for AI-generated content |
BaseAIClient ([base_dir])
|
Abstract base class for AI content generation clients |
ClaudeAPIClient ([base_dir])
|
Client for generating content using Claude API |
ContentType (value)
|
Types of AI-generated content |
Path (*args, **kwargs)
|
PurePath subclass that can make system calls. |
Exceptions
AIContentError
|
Exception raised when AI content generation fails |
AIProviderError
|
Exception raised when AI provider is not available or configured incorrectly |
-
class claude_api_client.ClaudeAPIClient(base_dir='.')[source]
Client for generating content using Claude API
-
__init__(base_dir='.')[source]
-
is_available()[source]
Check if Claude API is available and configured
- Return type:
bool
-
get_model_name()[source]
Get the specific Claude model name
- Return type:
str
-
generate_content(request)[source]
Generate AI content for the given request
- Return type:
AIContentResponse
-
generate_all_cover_letter_content(job_description, profile_content, company_name, position_title)[source]
Generate all cover letter content variables at once
- Return type:
Dict
[str
, str
]
-
extract_company_and_position(job_description)[source]
Extract company name and position title from job description
First tries to parse Adressat line, then falls back to Claude API
- Return type:
Dict
[str
, str
]
-
validate_api_key()[source]
Validate API key by making a simple test request
- Return type:
bool
-
get_usage_stats()[source]
Get usage statistics
- Return type:
Dict
[str
, Any
]
-
test_content_generation()[source]
Test content generation with sample data
- Return type:
bool