datarobot_genai.drmcputils.deployment
deployment
Pure helpers for DataRobot deployment prediction URLs and auth headers.
get_deployment_base_url
Compute the prediction base URL for a deployment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
deployment
|
Deployment
|
The DataRobot deployment object. |
required |
datarobot_endpoint
|
str
|
The DataRobot API endpoint (e.g. https://app.datarobot.com). |
required |
Returns
Deployment-scoped prediction URL.
Raises
ValueError: If prediction server cannot be determined.
Source code in datarobot_genai/drmcputils/deployment.py
build_deployment_auth_headers
Build authentication headers for a deployment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
deployment
|
Deployment
|
The DataRobot deployment object. |
required |
token
|
str
|
The bearer token to use for authentication. |
required |
Returns
Dictionary of authentication headers.