Skip to main content

PromptPlaygroundsClient

adaline.prompts.playgrounds reads the playgrounds attached to a prompt — the saved test scenarios with their own messages, variables, and run history. Every method is async.

Access

from adaline.main import Adaline

adaline = Adaline()
playgrounds = adaline.prompts.playgrounds  # PromptPlaygroundsClient
The class is also exported directly:
from adaline.clients import PromptPlaygroundsClient
Types from adaline_api:
from adaline_api.models.list_playgrounds_response import ListPlaygroundsResponse
from adaline_api.models.playground_detail import PlaygroundDetail

list()

List all playgrounds attached to a prompt.
async def list(*, prompt_id: str) -> ListPlaygroundsResponse

Example

response = await adaline.prompts.playgrounds.list(prompt_id="prompt_abc123")

for playground in response.data:
    print(playground.id, playground.title)

get()

Retrieve a single playground by ID.
async def get(
    *,
    prompt_id: str,
    playground_id: str,
) -> PlaygroundDetail

Example

playground = await adaline.prompts.playgrounds.get(
    prompt_id="prompt_abc123",
    playground_id="playground_xyz789",
)

print(playground.variables)

See Also