ConnectionPool
__init__
get_session
requests.Session- The HTTP session object
MaximAPI
__init__
| Name | Description |
|---|---|
base_url | The base URL for the Maxim API |
api_key | The API key for authentication |
get_prompt
| Name | Description |
|---|---|
id | The prompt ID |
| Name | Description |
|---|---|
[VersionAndRulesWithPromptId](/sdk/python/references/models/prompt) | The prompt details |
Exception- If the request fails
get_prompts
| Name | Description |
|---|---|
List[[VersionAndRulesWithPromptId](/sdk/python/references/models/prompt)] | List of all prompts |
Exception- If the request fails
getPromptChain
| Name | Description |
|---|---|
id | The prompt chain ID |
| Name | Description |
|---|---|
[VersionAndRulesWithPromptChainId](/sdk/python/references/models/prompt_chain) | The prompt chain details |
Exception- If the request fails
get_prompt_chains
| Name | Description |
|---|---|
List[[VersionAndRulesWithPromptChainId](/sdk/python/references/models/prompt_chain)] | List of all prompt chains |
Exception- If the request fails
run_prompt
| Name | Description |
|---|---|
model | The model to use |
messages | List of chat messages |
tools | Optional list of tools to use |
**kwargs | Additional parameters to pass to the API |
| Name | Description |
|---|---|
[PromptResponse](/sdk/python/references/models/prompt) | The response from the model |
Exception- If the request fails
run_prompt_version
| Name | Description |
|---|---|
prompt_version_id | The ID of the prompt version to run |
input | The input text for the prompt |
image_urls | Optional list of image URLs to include |
variables | Optional dictionary of variables to use |
| Name | Description |
|---|---|
Optional[[PromptResponse](/sdk/python/references/models/prompt)] | The response from the prompt |
Exception- If the request fails
run_prompt_chain_version
| Name | Description |
|---|---|
prompt_chain_version_id | The ID of the prompt chain version to run |
input | The input text for the prompt chain |
variables | Optional dictionary of variables to use |
| Name | Description |
|---|---|
Optional[[AgentResponse](/sdk/python/references/models/prompt_chain)] | The response from the prompt chain |
Exception- If the request fails
get_folder
| Name | Description |
|---|---|
id | The folder ID |
| Name | Description |
|---|---|
[Folder](/sdk/python/references/models/folder) | The folder details |
Exception- If the request fails
get_folders
| Name | Description |
|---|---|
List[[Folder](/sdk/python/references/models/folder)] | List of all folders |
Exception- If the request fails
add_dataset_entries
| Name | Description |
|---|---|
dataset_id | The ID of the dataset |
dataset_entries | List of dataset entries to add |
Exception- If the request fails
get_dataset_total_rows
| Name | Description |
|---|---|
dataset_id | The ID of the dataset |
| Name | Description |
|---|---|
int | The total number of rows |
Exception- If the request fails
get_dataset_row
| Name | Description |
|---|---|
dataset_id | The ID of the dataset |
row_index | The index of the row to retrieve |
| Name | Description |
|---|---|
Optional[[DatasetRow](/sdk/python/references/models/dataset)] | The dataset row, or None if not found |
Exception- If the request fails
get_dataset_structure
| Name | Description |
|---|---|
dataset_id | The ID of the dataset |
Exception- If the request fails
does_log_repository_exist
| Name | Description |
|---|---|
logger_id | The ID of the logger |
| Name | Description |
|---|---|
bool | True if the repository exists, False otherwise |
push_logs
| Name | Description |
|---|---|
repository_id | The ID of the repository |
logs | The logs to push |
Exception- If the request fails
fetch_platform_evaluator
| Name | Description |
|---|---|
name | The name of the evaluator |
in_workspace_id | The workspace ID |
| Name | Description |
|---|---|
[Evaluator](/sdk/python/references/models/evaluator) | The evaluator details |
Exception- If the request fails
create_test_run
| Name | Description |
|---|---|
name | The name of the test run |
workspace_id | The workspace ID |
workflow_id | Optional workflow ID |
prompt_version_id | Optional prompt version ID |
prompt_chain_version_id | Optional prompt chain version ID |
run_type | The type of run |
evaluator_config | List of evaluators to use |
requires_local_run | Whether the test run requires local execution |
human_evaluation_config | Optional human evaluation configuration |
| Name | Description |
|---|---|
[TestRun](/sdk/python/references/models/test_run) | The created test run |
Exception- If the request fails
attach_dataset_to_test_run
| Name | Description |
|---|---|
test_run_id | The ID of the test run |
dataset_id | The ID of the dataset |
Exception- If the request fails
push_test_run_entry
| Name | Description |
|---|---|
test_run | The test run |
entry | The test run entry to push |
run_config | Optional run configuration |
Exception- If the request fails
mark_test_run_processed
| Name | Description |
|---|---|
test_run_id | The ID of the test run |
Exception- If the request fails
mark_test_run_failed
| Name | Description |
|---|---|
test_run_id | The ID of the test run |
Exception- If the request fails
get_test_run_status
| Name | Description |
|---|---|
test_run_id | The ID of the test run |
| Name | Description |
|---|---|
[TestRunStatus](/sdk/python/references/models/test_run) | The status of the test run |
Exception- If the request fails
get_test_run_final_result
| Name | Description |
|---|---|
test_run_id | The ID of the test run |
| Name | Description |
|---|---|
[TestRunResult](/sdk/python/references/models/test_run) | The final result of the test run |
Exception- If the request fails
get_upload_url
| Name | Description |
|---|---|
key | The key (filename) for the upload |
mime_type | The MIME type of the file |
size | The size of the file in bytes |
| Name | Description |
|---|---|
[SignedURLResponse](/sdk/python/references/models/attachment) | A dictionary containing the signed URL for upload |
Exception- If the request fails
upload_to_signed_url
| Name | Description |
|---|---|
url | The signed URL to upload to |
data | The binary data to upload |
mime_type | The MIME type of the data |
| Name | Description |
|---|---|
bool | True if upload was successful, False otherwise |