Skip to main content

PromptsClient

adaline.prompts creates, reads, updates, and deletes prompts. Related prompt-scoped resources — drafts, playgrounds, evaluators, and evaluations — are exposed through nested sub-clients. Every method is async.

Access

The class is also exported directly:

Sub-clients

PromptsClient exposes four nested namespaces — evaluators and evaluations are here (not at the top level) because every URL is /prompts/{prompt_id}/...: Types from adaline_api:
Prompt embeds a PromptSnapshot with the latest config, PromptMessage[], ToolFunction[], and PromptVariable[].

list()

List prompts in a project (paginated).

Parameters

Returns

ListPromptsResponse with { data: list[Prompt]; pagination: Pagination }.

Example


create()

Create a new prompt in a project. The optional draft seeds the prompt’s initial config, messages, and tools.

Parameters

Returns

Prompt — the created prompt.

Example


get()

Retrieve a single prompt by ID. Use expand="playground" to include the default playground.

Parameters

Example


update()

Partially update a prompt. Sent as PATCH under the hood. Any field you omit is left untouched.

Parameters

Example


delete()

Permanently delete a prompt and all associated resources (drafts, playgrounds, deployments, evaluators, evaluations). Irreversible.

See Also