Skip to main content

PromptDraftClient

adaline.prompts.draft reads the current working draft of a prompt — the unsaved version shown in the editor before a save is applied. Every method is async.

Access

from adaline.main import Adaline

adaline = Adaline()
draft = adaline.prompts.draft  # PromptDraftClient
The class is also exported directly:
from adaline.clients import PromptDraftClient
Types from adaline_api:
from adaline_api.models.prompt_draft import PromptDraft

get()

Get the current draft for a prompt.
async def get(*, prompt_id: str) -> PromptDraft

Parameters

NameTypeRequiredDescription
prompt_idstrYesPrompt identifier.

Returns

PromptDraft with config, messages, tools, and variables mirroring the PromptSnapshot shape.

Example

draft = await adaline.prompts.draft.get(prompt_id="prompt_abc123")

print(draft.config.model)
print(draft.messages)

See Also