For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
BlogLog InRequest Demo
HomeProductDevelopersSelf-HostingChangelog
HomeProductDevelopersSelf-HostingChangelog
  • Getting Started
    • Overview
  • Workflows SDK
    • Introduction
    • Installation
    • Core Concepts
    • Defining Control Flow
    • Configuration
    • Custom Docker Images
      • Displayable Nodes
        • Agent Node
        • Inline Prompt Node
        • Inline Subworkflow Node
        • Prompt Deployment Node
        • Search Node
        • Subworkflow Deployment Node
        • API Node
        • Code Execution Node
        • Templating Node
        • Guardrail Node
        • Map Node
        • Conditional Node
        • Merge Node
        • Error Node
        • Final Output Node
      • Datasets
      • CLI
  • Client SDK
    • Introduction
    • Authentication
    • API Versioning
LogoLogo
BlogLog InRequest Demo
Workflows SDKAPI ReferenceDisplayable Nodes

Prompt Deployment Node

Example Usage
1from vellum.workflows.nodes import PromptDeploymentNode
2from vellum.client import PromptDeploymentExpandMetaRequest, RawPromptExecutionOverridesRequest
3
4class MyPromptDeploymentNode(PromptDeploymentNode):
5 deployment = "my_prompt_deployment"
6 prompt_inputs = {
7 "question": "What is the meaning of life?",
8 "chat_history": [
9 ChatMessage(role="USER", text="Hello!"),
10 ChatMessage(role="ASSISTANT", text="Hi there!"),
11 ],
12 "context": {
13 "source": "philosophy_book",
14 "chapter": 42
15 }
16 }
17 release_tag = "production"
18 external_id = "unique-execution-id"
19 expand_meta = PromptDeploymentExpandMetaRequest(
20 model_name=True,
21 usage=True,
22 cost=True,
23 finish_reason=True,
24 latency=True,
25 deployment_release_tag=True,
26 prompt_version_id=True
27 )
28 metadata = {
29 "user_id": "123",
30 "session_id": "abc"
31 }
1MyPromptDeploymentNode.Outputs(
2 text="happily",
3 results=[
4 StringVellumValue(value="h"),
5 StringVellumValue(value="app"),
6 StringVellumValue(value="ily"),
7 ]
8)
Was this page helpful?
Previous

Search Node

Next
Built with

vellum.workflows.nodes.PromptDeploymentNode

Used to execute a Prompt Deployment and surface a string output for convenience.

Attributes

deployment
Union[UUID, str]Required

Either the Prompt Deployment’s UUID or its name

prompt_inputs
EntityInputsInterfaceRequired

The inputs for the Prompt

release_tag
strDefaults to LATEST

The release tag to use for the Prompt Execution

external_id
Optional[str]

Optionally include a unique identifier for tracking purposes. Must be unique within a given Prompt Deployment.

expand_meta
Optional[PromptDeploymentExpandMetaRequest]

Expandable execution fields to include in the response. See more here.

raw_overrides
Optional[RawPromptExecutionOverridesRequest]

The raw overrides to use for the Prompt Execution

expand_raw
Optional[Sequence[str]]

Expandable raw fields to include in the response

metadata
Optional[Dict[str, Optional[Any]]]

The metadata to use for the Prompt Execution

request_options
Optional[RequestOptions]

The request options to use for the Prompt Execution

Outputs

text
str

The generated text output from the prompt execution

results
List[PromptOutput]

The array of results from the prompt execution. PromptOutput is a union of the following types:

  • StringVellumValue
  • FunctionCallVellumValue