import { SyllableSDK } from "syllable-sdk";
const syllableSDK = new SyllableSDK({
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
});
async function run() {
const result = await syllableSDK.prompts.promptsHistory({
promptId: 922849,
});
console.log(result);
}
run();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)curl --request GET \
--url https://api.syllable.cloud/api/v1/prompts/{prompt_id}/history \
--header 'Syllable-API-Key: <api-key>'const options = {method: 'GET', headers: {'Syllable-API-Key': '<api-key>'}};
fetch('https://api.syllable.cloud/api/v1/prompts/{prompt_id}/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.syllable.cloud/api/v1/prompts/{prompt_id}/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Syllable-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.syllable.cloud/api/v1/prompts/{prompt_id}/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Syllable-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.syllable.cloud/api/v1/prompts/{prompt_id}/history")
.header("Syllable-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.syllable.cloud/api/v1/prompts/{prompt_id}/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Syllable-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"timestamp": "2024-01-01T12:00:00Z",
"prompt_id": "1",
"version_number": 1,
"prompt_text": "You are a weather agent. Answer the user's questions about weather and nothing else.",
"prompt_name": "Weather Agent Prompt",
"user_email": "user@email.com",
"is_pre_enhancements": true,
"prompt_description": "Prompt for a weather agent.",
"llm_config": {
"provider": "anthropic",
"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": 1,
"current_tool_name": "hangup",
"out_of_date": false,
"deleted": false
},
"validation_issues": [
{
"id": "<string>",
"message": "<string>",
"severity": "error",
"path": "<string>",
"value": "<string>"
}
]
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Get Prompt History
Get a list of historical versions of a prompt by its ID
import { SyllableSDK } from "syllable-sdk";
const syllableSDK = new SyllableSDK({
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
});
async function run() {
const result = await syllableSDK.prompts.promptsHistory({
promptId: 922849,
});
console.log(result);
}
run();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)curl --request GET \
--url https://api.syllable.cloud/api/v1/prompts/{prompt_id}/history \
--header 'Syllable-API-Key: <api-key>'const options = {method: 'GET', headers: {'Syllable-API-Key': '<api-key>'}};
fetch('https://api.syllable.cloud/api/v1/prompts/{prompt_id}/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.syllable.cloud/api/v1/prompts/{prompt_id}/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Syllable-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.syllable.cloud/api/v1/prompts/{prompt_id}/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Syllable-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.syllable.cloud/api/v1/prompts/{prompt_id}/history")
.header("Syllable-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.syllable.cloud/api/v1/prompts/{prompt_id}/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Syllable-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"timestamp": "2024-01-01T12:00:00Z",
"prompt_id": "1",
"version_number": 1,
"prompt_text": "You are a weather agent. Answer the user's questions about weather and nothing else.",
"prompt_name": "Weather Agent Prompt",
"user_email": "user@email.com",
"is_pre_enhancements": true,
"prompt_description": "Prompt for a weather agent.",
"llm_config": {
"provider": "anthropic",
"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": 1,
"current_tool_name": "hangup",
"out_of_date": false,
"deleted": false
},
"validation_issues": [
{
"id": "<string>",
"message": "<string>",
"severity": "error",
"path": "<string>",
"value": "<string>"
}
]
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Path Parameters
Response
Successful Response
Timestamp of the change resulting in this version
"2024-01-01T12:00:00Z"
ID of the prompt
"1"
Version number of this version. Starts at 1 when prompt is created, and incremented on each change.
1
Text of the prompt at this version
"You are a weather agent. Answer the user's questions about weather and nothing else."
Name of the prompt at this version
"Weather Agent Prompt"
Email address of the user who made the change that resulted in this version
"user@email.com"
Whether this version of the prompt was created before history of tool-prompt linking was tracked
true
Description of the prompt at this version
"Prompt for a weather agent."
String representation of LLM config for the prompt at this version
Show child attributes
Show child attributes
Comments describing the change that resulted in this version
"Updated prompt text to include requirement to not answer questions that aren't about weather."
Tools that were linked to this version of the prompt
Show child attributes
Show child attributes
Session end tool that was configured on this version of the prompt, if any
Show child attributes
Show child attributes
Lifecycle findings for the model this version was saved on.
Show child attributes
Show child attributes

