Update conversation
editUpdate conversation
editUpdate an existing Elastic AI Assistant conversation by conversation ID.
Request URL
editPUT <kibana host>:<port>/api/security_ai_assistant/current_user/conversations/{id}
Request body
editName | Type | Description | Required |
---|---|---|---|
|
String |
Conversation ID to update. |
Yes |
|
String |
Conversation title. If you set it to "New chat", the AI will generate a title. |
No |
|
Conversation configuration. |
No |
|
|
Array of conversation messages. |
No |
|
|
Key, Value(String, String) |
List of the fields with anonymization. |
No |
apiConfig
object
editName | Type | Description | Required |
---|---|---|---|
|
String |
Kibana connector ID. |
No |
|
String |
Kibana connector action type ID. |
No |
|
String |
Default system prompt ID. |
No |
|
String |
LLM specific model. |
No |
messages
object
editName | Type | Description | Required |
---|---|---|---|
|
String |
Message role. Can be "user", "assistant", or "system". |
Yes |
|
String |
Message content to send to LLM. |
Yes |
|
Boolean |
Define if the message is an error message instead of an LLM response. |
No |
|
String |
Timestamp when the message was sent. |
No |
Example requests
editExample 1
Updates an existing Elastic AI Assistant conversation with an id
value of a696901d-efff-4871-acbe-8123af841932
PUT api/security_ai_assistant/current_user/conversations/a696901d-efff-4871-acbe-8123af841932 { "id": "a696901d-efff-4871-acbe-8123af841932", "title": "The conversation title.", "messages": [ { "content": "test content", "role": "user", "isError": false, "timestamp": "2019-12-13T16:40:33.400Z" } ], "apiConfig": { "actionTypeId": ".gen-ai", "connectorId": "86ab-471c-a00b-25b7e20c2d12", "defaultSystemPromptId": "Default", "model": "gpt-4o" } }
Response code
edit200
Indicates a successful call.
Response payload
editA JSON conversation object with a unique id
.
Example 1
Conversation response payload:
{ "timestamp": "2024-08-02T07:19:08.124Z", "createdAt": "2024-08-02T07:19:08.124Z", "users": [ { "id": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0", "name": "elastic" } ], "title": "The conversation title.", "category": "assistant", "apiConfig": { "connectorId": "86ab-471c-a00b-25b7e20c2d12", "actionTypeId": ".gen-ai", "defaultSystemPromptId": "Default", "model": "gpt-4o" }, "isDefault": true, "messages": [ { "timestamp": "2019-12-13T16:40:33.400Z", "content": "test content", "role": "user" } ], "updatedAt": "2024-08-02T07:39:45.129Z", "replacements": {}, "namespace": "default", "id": "a696901d-efff-4871-acbe-8123af841932" }