Join our webinar: Building Reliable Conversational & Voice AI with Simulations, this Thursday, November 13th. Link
import requests
url = "https://app.langwatch.ai/api/prompts/{id}/versions"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)[
{
"id": "<string>",
"handle": "<string>",
"scope": "ORGANIZATION",
"name": "<string>",
"updatedAt": "<string>",
"projectId": "<string>",
"organizationId": "<string>",
"versionId": "<string>",
"version": 123,
"createdAt": "<string>",
"prompt": "<string>",
"messages": [],
"inputs": [
{
"identifier": "<string>",
"type": "str"
}
],
"outputs": [
{
"identifier": "<string>",
"type": "str",
"json_schema": {
"type": "<string>"
}
}
],
"model": "<string>",
"authorId": "<string>",
"commitMessage": "<string>",
"temperature": 123,
"maxTokens": 123,
"demonstrations": {
"id": "<string>",
"name": "<string>",
"inline": {
"records": {},
"columnTypes": [
{
"name": "<string>",
"type": "<string>",
"id": "<string>"
}
]
}
},
"promptingTechnique": {
"type": "few_shot",
"demonstrations": {
"id": "<string>",
"name": "<string>",
"inline": {
"records": {},
"columnTypes": [
{
"name": "<string>",
"type": "<string>",
"id": "<string>"
}
]
}
}
},
"responseFormat": {
"type": "json_schema",
"json_schema": {
"name": "<string>",
"schema": {}
}
}
}
]Get all versions for a prompt. Does not include base prompt data, only versioned data.
import requests
url = "https://app.langwatch.ai/api/prompts/{id}/versions"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)[
{
"id": "<string>",
"handle": "<string>",
"scope": "ORGANIZATION",
"name": "<string>",
"updatedAt": "<string>",
"projectId": "<string>",
"organizationId": "<string>",
"versionId": "<string>",
"version": 123,
"createdAt": "<string>",
"prompt": "<string>",
"messages": [],
"inputs": [
{
"identifier": "<string>",
"type": "str"
}
],
"outputs": [
{
"identifier": "<string>",
"type": "str",
"json_schema": {
"type": "<string>"
}
}
],
"model": "<string>",
"authorId": "<string>",
"commitMessage": "<string>",
"temperature": 123,
"maxTokens": 123,
"demonstrations": {
"id": "<string>",
"name": "<string>",
"inline": {
"records": {},
"columnTypes": [
{
"name": "<string>",
"type": "<string>",
"id": "<string>"
}
]
}
},
"promptingTechnique": {
"type": "few_shot",
"demonstrations": {
"id": "<string>",
"name": "<string>",
"inline": {
"records": {},
"columnTypes": [
{
"name": "<string>",
"type": "<string>",
"id": "<string>"
}
]
}
}
},
"responseFormat": {
"type": "json_schema",
"json_schema": {
"name": "<string>",
"schema": {}
}
}
}
]Success
ORGANIZATION, PROJECT 1Show child attributes
Show child attributes
Show child attributes
few_shot, in_context, chain_of_thought Show child attributes
Show child attributes
Was this page helpful?