Skip to main content

Deployment

Types related to prompt deployments in the Python SDK.

Deployment

A specific instance of a prompt that has been deployed to an environment. Returned by get_deployment() and get_latest_deployment().

Fields

str
required
The unique deployment identifier.
int
required
Unix timestamp of when the deployment was created.
int
required
Unix timestamp of when the deployment was last updated.
str
required
The ID of the user who created the deployment.
str
required
The ID of the user who last updated the deployment.
str
required
The associated project ID.
str
required
The associated prompt ID.
str
required
The target deployment environment ID.
PromptSnapshot
required
The complete deployed prompt snapshot. See PromptSnapshot below.

Example


PromptSnapshot

See the dedicated PromptSnapshot page for full documentation. The complete prompt configuration captured at deployment time, including model config, messages, tools, and variables.

Fields

PromptSnapshotConfig
required
Model provider and settings. See Config Types.
list[PromptMessage]
required
The prompt messages. Each message contains role and content fields.
list[ToolFunction]
required
Tool/function definitions available to the model.
list[PromptVariable]
required
Variable definitions used in the prompt template. See PromptVariable below.

PromptVariable

See the dedicated PromptVariable page for full documentation. A variable definition used in prompt templates.

Fields

str
required
The variable name (used as {{variable_name}} in prompt templates).
str
required
The variable type. One of: "text", "image", "pdf", "api", "prompt".

Example


Complete Example