stack kb security-ai-assistant-api chat-complete cli command
Auth required
elastic stack kb security-ai-assistant-api chat-complete \
--connector-id <connector-id> \
--messages <messages> \
--persist \
[options]
Create a model response
--connector-idstringrequired- Required connector identifier to route the request.
--messagesstring[]required- List of chat messages exchanged so far.
--[no-]persistrequired- Whether to persist the chat and response to storage.
--[no-]content-references-disabled- If true, the response will not include content references.
--conversation-idstring- A string that does not contain only whitespace characters.
--[no-]is-stream- If true, the response will be streamed in chunks.
--lang-smith-api-keystring- API key for LangSmith integration.
--lang-smith-projectstring- LangSmith project name for tracing.
--modelstring- Model ID or name to use for the response.
--prompt-idstring- Prompt template identifier.
--response-languagestring- ISO language code for the assistant's response.
--input-filestring- path to a JSON file to use as command input
-V--[no-]version- Print the Elastic CLI version
--config-filestring- path to a config file (default: ~/.elasticrc.yml)
--use-contextstring- override the active context from the config file
--command-profilestring- restrict available commands to a deployment profile (serverless, stack, default)
--[no-]json- output as JSON
--output-fieldsstring- comma-separated list of fields to include in output (dot-notation supported)
--output-templatestring- Mustache-like template for custom text output (e.g. "{{id}}: {{name}}")
--[no-]dry-run-
validate all inputs and exit without performing any action (preview changes without applying them)