Run a specific prompt based on the Prompt ID and Prompt Version ID passed in. The results will be streamed using SSE. Not recommended when creating classifiers to make decisions, since full response is not available for decision making.
curl --request POST \
--url https://api.hyperleapai.com/prompt-runs/run-sse \
--header 'Content-Type: application/json' \
--header 'x-hl-api-key: <api-key>' \
--data '{
"promptId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"promptVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"replacements": {},
"stream": true
}'
[
{
"choice": {
"finish_reason": "<string>",
"index": 123,
"message": {
"role": "<string>",
"content": "<string>",
"toolCallId": "<string>",
"name": "<string>"
},
"moderation_results": {
"categoryResults": [
{
"category": "<string>",
"filtered": true,
"severity": "<string>"
}
]
}
},
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
},
"messageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"citations": [
{
"link": "<string>",
"index": "<string>",
"documentId": "<string>",
"fileId": "<string>",
"sourceContentType": "<string>",
"sourceName": "<string>",
"sourceUrl": "<string>",
"partitions": [
{
"text": "<string>",
"relevance": 123,
"partitionNumber": 123,
"sectionNumber": 123,
"lastUpdate": "2023-11-07T05:31:56Z",
"tags": {}
}
]
}
]
}
]
OK
The response is of type object[]
.
curl --request POST \
--url https://api.hyperleapai.com/prompt-runs/run-sse \
--header 'Content-Type: application/json' \
--header 'x-hl-api-key: <api-key>' \
--data '{
"promptId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"promptVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"replacements": {},
"stream": true
}'
[
{
"choice": {
"finish_reason": "<string>",
"index": 123,
"message": {
"role": "<string>",
"content": "<string>",
"toolCallId": "<string>",
"name": "<string>"
},
"moderation_results": {
"categoryResults": [
{
"category": "<string>",
"filtered": true,
"severity": "<string>"
}
]
}
},
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
},
"messageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"citations": [
{
"link": "<string>",
"index": "<string>",
"documentId": "<string>",
"fileId": "<string>",
"sourceContentType": "<string>",
"sourceName": "<string>",
"sourceUrl": "<string>",
"partitions": [
{
"text": "<string>",
"relevance": 123,
"partitionNumber": 123,
"sectionNumber": 123,
"lastUpdate": "2023-11-07T05:31:56Z",
"tags": {}
}
]
}
]
}
]
Run a specific prompt based on the Prompt ID and Prompt Version ID passed in. The results will be streamed using SSE. Not recommended when creating classifiers to make decisions, since full response is not available for decision making.
curl --request POST \
--url https://api.hyperleapai.com/prompt-runs/run-sse \
--header 'Content-Type: application/json' \
--header 'x-hl-api-key: <api-key>' \
--data '{
"promptId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"promptVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"replacements": {},
"stream": true
}'
[
{
"choice": {
"finish_reason": "<string>",
"index": 123,
"message": {
"role": "<string>",
"content": "<string>",
"toolCallId": "<string>",
"name": "<string>"
},
"moderation_results": {
"categoryResults": [
{
"category": "<string>",
"filtered": true,
"severity": "<string>"
}
]
}
},
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
},
"messageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"citations": [
{
"link": "<string>",
"index": "<string>",
"documentId": "<string>",
"fileId": "<string>",
"sourceContentType": "<string>",
"sourceName": "<string>",
"sourceUrl": "<string>",
"partitions": [
{
"text": "<string>",
"relevance": 123,
"partitionNumber": 123,
"sectionNumber": 123,
"lastUpdate": "2023-11-07T05:31:56Z",
"tags": {}
}
]
}
]
}
]
OK
The response is of type object[]
.
curl --request POST \
--url https://api.hyperleapai.com/prompt-runs/run-sse \
--header 'Content-Type: application/json' \
--header 'x-hl-api-key: <api-key>' \
--data '{
"promptId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"promptVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"replacements": {},
"stream": true
}'
[
{
"choice": {
"finish_reason": "<string>",
"index": 123,
"message": {
"role": "<string>",
"content": "<string>",
"toolCallId": "<string>",
"name": "<string>"
},
"moderation_results": {
"categoryResults": [
{
"category": "<string>",
"filtered": true,
"severity": "<string>"
}
]
}
},
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
},
"messageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"citations": [
{
"link": "<string>",
"index": "<string>",
"documentId": "<string>",
"fileId": "<string>",
"sourceContentType": "<string>",
"sourceName": "<string>",
"sourceUrl": "<string>",
"partitions": [
{
"text": "<string>",
"relevance": 123,
"partitionNumber": 123,
"sectionNumber": 123,
"lastUpdate": "2023-11-07T05:31:56Z",
"tags": {}
}
]
}
]
}
]