Batch Update Messages
messages.batch.update(BatchUpdateParams**kwargs) -> BatchUpdateResponse
PUT/messages/batch
Batch Update Messages
import os
from agentex import Agentex
client = Agentex(
api_key=os.environ.get("AGENTEX_SDK_API_KEY"), # This is the default and can be omitted
)
task_messages = client.messages.batch.update(
task_id="task_id",
updates={
"foo": {
"author": "user",
"content": "content",
"type": "text",
}
},
)
print(task_messages)[
{
"content": {
"author": "user",
"content": "content",
"attachments": [
{
"file_id": "file_id",
"name": "name",
"size": 0,
"type": "type"
}
],
"format": "markdown",
"style": "static",
"type": "text"
},
"task_id": "task_id",
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"streaming_status": "IN_PROGRESS",
"updated_at": "2019-12-27T18:11:19.117Z"
}
]Returns Examples
[
{
"content": {
"author": "user",
"content": "content",
"attachments": [
{
"file_id": "file_id",
"name": "name",
"size": 0,
"type": "type"
}
],
"format": "markdown",
"style": "static",
"type": "text"
},
"task_id": "task_id",
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"streaming_status": "IN_PROGRESS",
"updated_at": "2019-12-27T18:11:19.117Z"
}
]