Skip to main content
GET
/
api
/
v1
/
prompts
/
{prompt_id}
/
history
Python (SDK)
import os
from syllable_sdk import SyllableSDK


with SyllableSDK(
    api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:

    res = ss_client.prompts.prompts_history(prompt_id=922849)

    # Handle response
    print(res)
[
  {
    "timestamp": "2023-11-07T05:31:56Z",
    "prompt_id": "<string>",
    "version_number": 123,
    "prompt_text": "<string>",
    "prompt_name": "<string>",
    "user_email": "<string>",
    "is_pre_enhancements": true,
    "prompt_description": "Prompt for a weather agent.",
    "llm_config": {
      "provider": "azure_openai",
      "model": "gpt-4o",
      "version": "2024-05-13",
      "api_version": "2024-06-01",
      "temperature": 1,
      "seed": 123
    },
    "comments": "Updated prompt text to include requirement to not answer questions that aren't about weather.",
    "linked_tools": [],
    "session_end_tool": {
      "tool_id": 123,
      "current_tool_name": "<string>",
      "out_of_date": true,
      "deleted": true
    }
  }
]

Authorizations

Syllable-API-Key
string
header
required

Path Parameters

prompt_id
integer
required

Response

Successful Response

timestamp
string<date-time>
required

Timestamp of the change resulting in this version

prompt_id
string
required

ID of the prompt

version_number
integer
required

Version number of this version. Starts at 1 when prompt is created, and incremented on each change.

prompt_text
string
required

Text of the prompt at this version

prompt_name
string
required

Name of the prompt at this version

user_email
string
required

Email address of the user who made the change that resulted in this version

is_pre_enhancements
boolean
required

Whether this version of the prompt was created before history of tool-prompt linking was tracked

prompt_description
string | null

Description of the prompt at this version

Example:

"Prompt for a weather agent."

llm_config
PromptLlmConfig · object

String representation of LLM config for the prompt at this version

comments
string | null

Comments describing the change that resulted in this version

Example:

"Updated prompt text to include requirement to not answer questions that aren't about weather."

linked_tools
PromptHistoryLinkedTool · object[]

Tools that were linked to this version of the prompt

session_end_tool
PromptHistoryLinkedTool · object

Session end tool that was configured on this version of the prompt, if any