You can find the promptset_id when you click on Prompts -> <Your_Prompt_Registry> -> Prompt Registry ID
If no version is provided the live prompt in the registry is fetched. If there are no live prompts an error is thrown
A complete list of supported parameters for the GET promptset endpoint is provided below.
Id of the prompt registry. This can be found on the langtrace ui.
Prompt version to fetch from the prompt registry.
Variables to replace in the prompt string. Usage is as follows: variables.<variable_name>=<variable_value>&variables.<variable_name>=<variable_value>…
200 (OK) Response Object Schema
Prompt registry description
Id of the project this registry is associated to
Hide Prompt Object Properties
Variable names in the prompt value
Name of the model being used
Settings configured on the model
Indicates if the prompt is live. Only one prompt in the registry can be live
Tags associated with the prompt
If this prompt was traced using the langtrace sdk this will contain the id of the span otherwise it will be null
Notes associated with the prompt
ISO 8601 date-time string
ISO 8601 date-time string
ISO 8601 date-time string
ISO 8601 date-time string
Error Response Object Schema
Hide Error Object Properties
cURL
Python
Javascript
PHP
Go
Java
curl --request GET \
--url https://app.langtrace.ai/api/promptset?promptsetid=clw123ay10001v55p02lo1lmp & variables.name =langtrace & variables.org =chatbot \
--header 'x-api-key: 5b4077b5068e79e9b2742fc65afa03327210c4c6f54d213b09f25b516d07ee9f'
Sample 200 (OK) Response
Sample Error Response
{
"id" : "clw123ay10001v55p02lo1lmp" ,
"name" : "Slack Chatbot " ,
"description" : "slack chatbot" ,
"projectId" : "clw12223e0001eapng5a66f2u" ,
"createdAt" : "2024-05-10T19:14:20.324Z" ,
"updatedAt" : "2024-05-10T19:14:20.324Z" ,
"prompts" : [
{
"id" : "clw129y460001o8cgv2uksm3p" ,
"value" : "You are a slack chatbot for company langtrace and org chatbot" ,
"variables" : [
"name" ,
"org"
],
"model" : "gpt-3.5-turbo" ,
"modelSettings" : {},
"version" : 2 ,
"live" : true ,
"tags" : [],
"spanId" : null ,
"note" : "Slack chatbot prompt testing" ,
"promptsetId" : "clw123ay10001v55p02lo1lmp" ,
"createdAt" : "2024-05-10T19:19:30.293Z" ,
"updatedAt" : "2024-05-10T19:19:30.293Z"
}
]
}