base_ai_client
Base AI Client - Abstract interface for different AI providers
Functions
abstractmethod (funcobj)
|
A decorator indicating abstract methods. |
Classes
ABC ()
|
Helper class that provides a standard way to create an ABC using inheritance. |
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 |
Exceptions
AIContentError
|
Exception raised when AI content generation fails |
AIProviderError
|
Exception raised when AI provider is not available or configured incorrectly |
-
class base_ai_client.BaseAIClient(base_dir='.')[source]
Abstract base class for AI content generation clients
-
__init__(base_dir='.')[source]
-
abstract is_available()[source]
Check if AI client is available and configured
- Return type:
bool
-
abstract generate_content(request)[source]
Generate AI content for the given request
- Return type:
AIContentResponse
-
abstract 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
]
-
abstract extract_company_and_position(job_description)[source]
Extract company name and position title from job description
- Return type:
Dict
[str
, str
]
-
get_provider_name()[source]
Get the name of the AI provider
- Return type:
str
-
abstract get_model_name()[source]
Get the specific model name (e.g., ‘sonnet-4’, ‘3.2-3b’, ‘content’)
- Return type:
str
-
get_client_model_folder()[source]
Get formatted folder name for client and model
- Return type:
str
-
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
-
exception base_ai_client.AIProviderError[source]
Exception raised when AI provider is not available or configured incorrectly
-
exception base_ai_client.AIContentError[source]
Exception raised when AI content generation fails