Config
Theconfig module provides an interface for reading and writing configuration values. It includes functions to load, retrieve, and update configuration values for the Prometheux platform.
Configuration Functions
Get Configuration Value
Retrieves a value from the configuration using the specified key.- Python SDK
- REST API
| Parameter | Type | Required | Description |
|---|---|---|---|
key | str | Yes | The key for the configuration value to retrieve |
default | any | No | A default value to return if the key is not found |
None if the key does not exist.Set Configuration Value
Sets a configuration value for the specified key.- Python SDK
- REST API
| Parameter | Type | Required | Description |
|---|---|---|---|
key | str | Yes | The key for the configuration value to set |
value | any | Yes | The value to associate with the key |
Update Multiple Configuration Values
Update multiple configuration values at once from a dictionary.- Python SDK
- REST API
| Parameter | Type | Required | Description |
|---|---|---|---|
updates | dict | Yes | A dictionary containing keys and values to update |
Authentication Token
ThePMTX_TOKEN can be configured in two ways:
Using Environment Variables
Using the SDK Configuration
Configuring LLMs
The Prometheux Chain exploits LLMs to generate more human-readableexplanations, translations of Vadalog rules, graph rag and LLM output validation tasks. By default, no LLM is configured.
Setting up the LLM
To enable and configure an LLM, such as OpenAI’s GPT, follow these steps: 1. Set the LLM Provider:Default Configurations
The SDK uses the following default configurations:| Key | Default Value | Description |
|---|---|---|
PMTX_TOKEN | None | Prometheux authentication token |
LLM_API_KEY | None | LLM API key |
LLM_PROVIDER | OpenAI | LLM provider name |
LLM_VERSION | gpt-4o | LLM model version |
LLM_TEMPERATURE | 0.50 | LLM temperature setting |
LLM_MAX_TOKENS | 2000 | Maximum tokens for LLM responses |
EMBEDDING_MODEL_VERSION | text-embedding-3-large | Embedding model version |
EMBEDDING_DIMENSIONS | 2048 | Embedding dimensions |
User Management
Get User Role
Retrieve the current user’s role.Python SDK: Not available in the current SDK. Use the REST API below.
HTTP Request
cURL Example
Response
Get Usage Status
Get current API usage statistics and limits.Python SDK: Not available in the current SDK. Use the REST API below.
HTTP Request
cURL Example
Response
Save User Config
Persist user-scoped configuration on the server (for example UI preferences).- Python SDK
- REST API
| Parameter | Type | Required | Description |
|---|---|---|---|
config_data | dict | Yes | Key-value configuration to save |
scope | str | No | Configuration scope (default: "user") |
Load User Config
Load user-scoped configuration from the server.- Python SDK
- REST API
| Parameter | Type | Required | Description |
|---|---|---|---|
scope | str | No | Configuration scope (default: "user") |

