src.llm.adapters.watsonx.watsonx_config.WatsonXConfig
Configuration management for WatsonX credentials and settings.
This class handles loading and validation of required WatsonX credentials from environment variables.
Attributes:
Name | Type | Description |
---|---|---|
CREDS |
dict
|
Dictionary containing API key and URL for WatsonX. |
PROJECT_ID |
str
|
WatsonX project identifier. |
Example
# Validate credentials before use
WatsonXConfig.validate_credentials()
# Access credentials
credentials = WatsonXConfig.CREDS
project_id = WatsonXConfig.PROJECT_ID
Source code in src/llm/adapters/watsonx/watsonx_config.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
|
validate_credentials()
classmethod
Validate the presence of required WatsonX credentials.
Checks for the presence of all required credentials and logs appropriate messages for missing values.
Raises:
Type | Description |
---|---|
ValueError
|
If any required credential is missing. |
Source code in src/llm/adapters/watsonx/watsonx_config.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
|