import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/playground-conversations/{conversation_id}/poll/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/playground-conversations/{conversation_id}/poll/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/playground-conversations/{conversation_id}/poll/ \
--header 'Authorization: Bearer <token>'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"turn_status": "idle",
"turn_error": "<string>",
"turn_events": [
{
"type_streaming": "<string>",
"payload": {}
}
],
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "Authentication credentials were not provided."
}{
"error": "You do not have permission to perform this action."
}{
"error": "Not found."
}Poll turn status
Return the in-flight turn state for a conversation: the current
turn_status, the accumulated message-level turn_events buffer, and
updated_at. Clients poll this every few seconds after send_message
returns 202 and re-render from the returned events. A RUNNING turn
whose updated_at has gone stale is transitioned to failed on read.
import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/playground-conversations/{conversation_id}/poll/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/playground-conversations/{conversation_id}/poll/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/playground-conversations/{conversation_id}/poll/ \
--header 'Authorization: Bearer <token>'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"turn_status": "idle",
"turn_error": "<string>",
"turn_events": [
{
"type_streaming": "<string>",
"payload": {}
}
],
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "Authentication credentials were not provided."
}{
"error": "You do not have permission to perform this action."
}{
"error": "Not found."
}Authorizations
Use Authorization: Bearer
Path Parameters
UUID of the project
UUID of the conversation
Response
Current turn state
In-flight turn state returned by the async send_message (202) and poll
endpoints for playground and Work-with-Clara conversations.
Lifecycle of the current chat turn
idle, running, failed Failure detail when turn_status is failed (empty otherwise)
Accumulated message-level events for the current turn. Each item mirrors
a former SSE frame: {type_streaming, payload} where type_streaming is
one of streaming_in_progress, streaming_error, streaming_completed, or
quick_replies_ready (Clara only).
Show child attributes
Show child attributes
Last activity timestamp; doubles as the turn staleness heartbeat