Suggest an evaluation-metric prompt
curl --request POST \
--url https://api.pineyard.ai/campaigns/suggest-metric-prompt \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"allowedValues": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({label: '<string>', allowedValues: ['<string>']})
};
fetch('https://api.pineyard.ai/campaigns/suggest-metric-prompt', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/campaigns/suggest-metric-prompt"
payload = {
"label": "<string>",
"allowedValues": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"prompt": "<string>"
}AI assist
Suggest an evaluation-metric prompt
Generate or rewrite a single evaluation-metric classification prompt (AI).
POST
/
campaigns
/
suggest-metric-prompt
Suggest an evaluation-metric prompt
curl --request POST \
--url https://api.pineyard.ai/campaigns/suggest-metric-prompt \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"allowedValues": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({label: '<string>', allowedValues: ['<string>']})
};
fetch('https://api.pineyard.ai/campaigns/suggest-metric-prompt', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/campaigns/suggest-metric-prompt"
payload = {
"label": "<string>",
"allowedValues": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"prompt": "<string>"
}Required scope:
campaigns.editAuthorizations
Your API key, e.g. pk_live_xxxxxxxxxxxxxxxxxxxxxxxx.
Body
application/json
Response
Prompt

