Generate a chat completion

Base URL
https://{kibana_url}
  • POST /api/observability_ai_assistant/chat/complete
Auth

Create a new chat completion by using the Observability AI Assistant.

The API returns the model's response based on the current conversation context.

It also handles any tool requests within the conversation, which may trigger multiple calls to the underlying large language model (LLM).

This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.

Request body

actions object[]
description string

The description of the function.

name string

The name of the function.

parameters object

The parameters of the function.

connectorId string required

A unique identifier for the connector.

conversationId string

A unique identifier for the conversation if you are continuing an existing conversation.

disableFunctions boolean

Flag indicating whether all function calls should be disabled for the conversation. If true, no calls to functions will be made.

instructions union oneOf[]

An array of instruction objects, which can be either simple strings or detailed objects.

One of:

A simple instruction represented as a string.

messages object[] required

An array of message objects containing the conversation history.

@timestamp string required

The timestamp when the message was created.

message object required

The main content of the message.

content string

The content of the message.

data string

Additional data associated with the message.

event string

The event related to the message.

function_call object

Details of the function call within the message.

arguments string

The arguments for the function call.

name string required

The name of the function.

trigger enum required

The trigger of the function call.

Values: assistant user elastic
name string

The name associated with the message.

role enum required

The role of the message sender.

Values: system assistant function user elastic
persist boolean required

Indicates whether the conversation should be saved to storage. If true, the conversation will be saved and will be available in Kibana.

title string

A title for the conversation.

Response

Successful response

application/json

Response Type: object

Base URL
https://{kibana_url}