Documentation Index
Fetch the complete documentation index at: https://docs.tracia.io/llms.txt
Use this file to discover all available pages before exploring further.
prompts = client.prompts.list()
# Async
prompts = await client.prompts.alist()
Retrieve all prompts associated with your account, ordered by most recently updated.
Parameters
This method takes no parameters.
Response
Returns a list of PromptListItem objects.
class PromptListItem(BaseModel):
id: str
slug: str
name: str
description: str | None
current_version: int # alias: "currentVersion"
created_at: datetime # alias: "createdAt"
updated_at: datetime # alias: "updatedAt"
Examples
Basic Usage
prompts = client.prompts.list()
print(f"Found {len(prompts)} prompts")
Iterating Over Prompts
prompts = client.prompts.list()
for prompt in prompts:
print(f"{prompt.name} ({prompt.slug}) - v{prompt.current_version}")
print(f" Updated: {prompt.updated_at}")
Filtering Prompts
prompts = client.prompts.list()
# Find prompts by name
email_prompts = [p for p in prompts if "email" in p.name.lower()]
Error Handling
from tracia import TraciaError, TraciaErrorCode
try:
prompts = client.prompts.list()
except TraciaError as error:
if error.code == TraciaErrorCode.UNAUTHORIZED:
print("Invalid API key")