Récupérer les messages de la session
import requests
url = "https://app.ubik-agent.com/api/v1/agent-sessions/{session_id}/messages"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://app.ubik-agent.com/api/v1/agent-sessions/{session_id}/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://app.ubik-agent.com/api/v1/agent-sessions/{session_id}/messages \
--header 'X-API-KEY: <api-key>'{
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "<string>",
"content": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sibling_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"task_id": "<string>",
"stream_url": "<string>"
}
],
"active_head_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Récupérer les messages de la session
Récupère la branche active des messages pour la session.
GET
/
agent-sessions
/
{session_id}
/
messages
Récupérer les messages de la session
import requests
url = "https://app.ubik-agent.com/api/v1/agent-sessions/{session_id}/messages"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://app.ubik-agent.com/api/v1/agent-sessions/{session_id}/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://app.ubik-agent.com/api/v1/agent-sessions/{session_id}/messages \
--header 'X-API-KEY: <api-key>'{
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "<string>",
"content": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sibling_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"task_id": "<string>",
"stream_url": "<string>"
}
],
"active_head_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Autorisations
En-têtes
Paramètres de chemin
Réponse
Successful Response
Hide child attributes
Hide child attributes
Unique identifier for the message.
Role of the message sender (user, assistant, system).
Content of the message.
Creation timestamp.
ID of the parent message.
IDs of other messages that share the same parent (branches).
The ID of the task processing this message (if applicable).
URL to stream events for this task.
The ID of the current head of the conversation.
Cette page vous a-t-elle été utile ?
⌘I

