kibana/api_docs/inference.devdocs.json

1449 lines
No EOL
53 KiB
JSON

{
"id": "inference",
"client": {
"classes": [],
"functions": [
{
"parentPluginId": "inference",
"id": "def-public.httpResponseIntoObservable",
"type": "Function",
"tags": [],
"label": "httpResponseIntoObservable",
"description": [],
"signature": [
"() => ",
"OperatorFunction",
"<",
"StreamedHttpResponse",
", T>"
],
"path": "x-pack/platform/plugins/shared/inference/public/util/http_response_into_observable.ts",
"deprecated": false,
"trackAdoption": false,
"children": [],
"returnComment": [],
"initialIsOpen": false
}
],
"interfaces": [],
"enums": [],
"misc": [],
"objects": [],
"setup": {
"parentPluginId": "inference",
"id": "def-public.InferencePublicSetup",
"type": "Interface",
"tags": [],
"label": "InferencePublicSetup",
"description": [],
"path": "x-pack/platform/plugins/shared/inference/public/types.ts",
"deprecated": false,
"trackAdoption": false,
"children": [],
"lifecycle": "setup",
"initialIsOpen": true
},
"start": {
"parentPluginId": "inference",
"id": "def-public.InferencePublicStart",
"type": "Interface",
"tags": [],
"label": "InferencePublicStart",
"description": [],
"path": "x-pack/platform/plugins/shared/inference/public/types.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "inference",
"id": "def-public.InferencePublicStart.chatComplete",
"type": "Function",
"tags": [],
"label": "chatComplete",
"description": [],
"signature": [
"<TToolOptions extends ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ToolOptions",
"text": "ToolOptions"
},
"<string> = ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ToolOptions",
"text": "ToolOptions"
},
"<string>, TStream extends boolean = false>(options: ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ChatCompleteOptions",
"text": "ChatCompleteOptions"
},
"<TToolOptions, TStream>) => ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ChatCompleteCompositeResponse",
"text": "ChatCompleteCompositeResponse"
},
"<TToolOptions, TStream>"
],
"path": "x-pack/platform/plugins/shared/inference/public/types.ts",
"deprecated": false,
"trackAdoption": false,
"returnComment": [],
"children": [
{
"parentPluginId": "inference",
"id": "def-public.InferencePublicStart.chatComplete.$1",
"type": "CompoundType",
"tags": [],
"label": "options",
"description": [],
"signature": [
"{ connectorId: string; stream?: TStream | undefined; system?: string | undefined; messages: ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.Message",
"text": "Message"
},
"[]; temperature?: number | undefined; modelName?: string | undefined; functionCalling?: ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.FunctionCallingMode",
"text": "FunctionCallingMode"
},
" | undefined; abortSignal?: AbortSignal | undefined; metadata?: ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ChatCompleteMetadata",
"text": "ChatCompleteMetadata"
},
" | undefined; maxRetries?: number | undefined; retryConfiguration?: ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ChatCompleteRetryConfiguration",
"text": "ChatCompleteRetryConfiguration"
},
" | undefined; } & TToolOptions"
],
"path": "x-pack/platform/packages/shared/ai-infra/inference-common/src/chat_complete/api.ts",
"deprecated": false,
"trackAdoption": false
}
]
},
{
"parentPluginId": "inference",
"id": "def-public.InferencePublicStart.output",
"type": "Function",
"tags": [],
"label": "output",
"description": [],
"signature": [
"<TId extends string = string, TOutputSchema extends ",
"ToolSchemaTypeObject",
" | undefined = ",
"ToolSchemaTypeObject",
" | undefined, TStream extends boolean = false>(options: ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.OutputOptions",
"text": "OutputOptions"
},
"<TId, TOutputSchema, TStream>) => ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.OutputCompositeResponse",
"text": "OutputCompositeResponse"
},
"<TId, TOutputSchema, TStream>"
],
"path": "x-pack/platform/plugins/shared/inference/public/types.ts",
"deprecated": false,
"trackAdoption": false,
"returnComment": [],
"children": [
{
"parentPluginId": "inference",
"id": "def-public.InferencePublicStart.output.$1",
"type": "Object",
"tags": [],
"label": "options",
"description": [],
"signature": [
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.OutputOptions",
"text": "OutputOptions"
},
"<TId, TOutputSchema, TStream>"
],
"path": "x-pack/platform/packages/shared/ai-infra/inference-common/src/output/api.ts",
"deprecated": false,
"trackAdoption": false
}
]
},
{
"parentPluginId": "inference",
"id": "def-public.InferencePublicStart.getConnectors",
"type": "Function",
"tags": [],
"label": "getConnectors",
"description": [],
"signature": [
"() => Promise<",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.InferenceConnector",
"text": "InferenceConnector"
},
"[]>"
],
"path": "x-pack/platform/plugins/shared/inference/public/types.ts",
"deprecated": false,
"trackAdoption": false,
"children": [],
"returnComment": []
}
],
"lifecycle": "start",
"initialIsOpen": true
}
},
"server": {
"classes": [],
"functions": [
{
"parentPluginId": "inference",
"id": "def-server.naturalLanguageToEsql",
"type": "Function",
"tags": [],
"label": "naturalLanguageToEsql",
"description": [],
"signature": [
"({\n client,\n connectorId,\n tools,\n toolChoice,\n logger,\n functionCalling,\n maxRetries,\n retryConfiguration,\n system,\n metadata,\n ...rest\n}: ",
"NlToEsqlTaskParams",
"<TToolOptions>) => ",
"Observable",
"<",
"NlToEsqlTaskEvent",
"<TToolOptions>>"
],
"path": "x-pack/platform/plugins/shared/inference/server/tasks/nl_to_esql/task.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "inference",
"id": "def-server.naturalLanguageToEsql.$1",
"type": "CompoundType",
"tags": [],
"label": "{\n client,\n connectorId,\n tools,\n toolChoice,\n logger,\n functionCalling,\n maxRetries,\n retryConfiguration,\n system,\n metadata,\n ...rest\n}",
"description": [],
"signature": [
"NlToEsqlTaskParams",
"<TToolOptions>"
],
"path": "x-pack/platform/plugins/shared/inference/server/tasks/nl_to_esql/task.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
}
],
"returnComment": [],
"initialIsOpen": false
},
{
"parentPluginId": "inference",
"id": "def-server.withChatCompleteSpan",
"type": "Function",
"tags": [],
"label": "withChatCompleteSpan",
"description": [
"\nWrapper around {@link withInferenceSpan} that sets the right attributes for a chat operation span."
],
"signature": [
"(options: InferenceGenerationOptions, cb: (span?: ",
"Span",
" | undefined) => T) => T"
],
"path": "x-pack/platform/plugins/shared/inference/server/tracing/with_chat_complete_span.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "inference",
"id": "def-server.withChatCompleteSpan.$1",
"type": "Object",
"tags": [],
"label": "options",
"description": [],
"signature": [
"InferenceGenerationOptions"
],
"path": "x-pack/platform/plugins/shared/inference/server/tracing/with_chat_complete_span.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
},
{
"parentPluginId": "inference",
"id": "def-server.withChatCompleteSpan.$2",
"type": "Function",
"tags": [],
"label": "cb",
"description": [],
"signature": [
"(span?: ",
"Span",
" | undefined) => T"
],
"path": "x-pack/platform/plugins/shared/inference/server/tracing/with_chat_complete_span.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
}
],
"returnComment": [],
"initialIsOpen": false
},
{
"parentPluginId": "inference",
"id": "def-server.withChatCompleteSpan",
"type": "Function",
"tags": [],
"label": "withChatCompleteSpan",
"description": [],
"signature": [
"(options: InferenceGenerationOptions, cb: (span?: ",
"Span",
" | undefined) => Promise<",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ChatCompleteResponse",
"text": "ChatCompleteResponse"
},
"<",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ToolOptions",
"text": "ToolOptions"
},
"<string>>> | ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ChatCompleteStreamResponse",
"text": "ChatCompleteStreamResponse"
},
"<",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ToolOptions",
"text": "ToolOptions"
},
"<string>>) => Promise<",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ChatCompleteResponse",
"text": "ChatCompleteResponse"
},
"<",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ToolOptions",
"text": "ToolOptions"
},
"<string>>> | ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ChatCompleteStreamResponse",
"text": "ChatCompleteStreamResponse"
},
"<",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ToolOptions",
"text": "ToolOptions"
},
"<string>>"
],
"path": "x-pack/platform/plugins/shared/inference/server/tracing/with_chat_complete_span.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "inference",
"id": "def-server.withChatCompleteSpan.$1",
"type": "Object",
"tags": [],
"label": "options",
"description": [],
"signature": [
"InferenceGenerationOptions"
],
"path": "x-pack/platform/plugins/shared/inference/server/tracing/with_chat_complete_span.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
},
{
"parentPluginId": "inference",
"id": "def-server.withChatCompleteSpan.$2",
"type": "Function",
"tags": [],
"label": "cb",
"description": [],
"signature": [
"(span?: ",
"Span",
" | undefined) => Promise<",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ChatCompleteResponse",
"text": "ChatCompleteResponse"
},
"<",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ToolOptions",
"text": "ToolOptions"
},
"<string>>> | ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ChatCompleteStreamResponse",
"text": "ChatCompleteStreamResponse"
},
"<",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ToolOptions",
"text": "ToolOptions"
},
"<string>>"
],
"path": "x-pack/platform/plugins/shared/inference/server/tracing/with_chat_complete_span.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
}
],
"returnComment": [],
"initialIsOpen": false
},
{
"parentPluginId": "inference",
"id": "def-server.withExecuteToolSpan",
"type": "Function",
"tags": [],
"label": "withExecuteToolSpan",
"description": [
"\nWrapper around {@link withInferenceSpan} that sets the right attributes for a execute_tool operation span."
],
"signature": [
"(options: string | { name: string; description?: string | undefined; toolCallId?: string | undefined; input?: unknown; }, cb: (span?: ",
"Span",
" | undefined) => T) => T"
],
"path": "x-pack/platform/plugins/shared/inference/server/tracing/with_execute_tool_span.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "inference",
"id": "def-server.withExecuteToolSpan.$1",
"type": "CompoundType",
"tags": [],
"label": "options",
"description": [],
"signature": [
"string | { name: string; description?: string | undefined; toolCallId?: string | undefined; input?: unknown; }"
],
"path": "x-pack/platform/plugins/shared/inference/server/tracing/with_execute_tool_span.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
},
{
"parentPluginId": "inference",
"id": "def-server.withExecuteToolSpan.$2",
"type": "Function",
"tags": [],
"label": "cb",
"description": [],
"signature": [
"(span?: ",
"Span",
" | undefined) => T"
],
"path": "x-pack/platform/plugins/shared/inference/server/tracing/with_execute_tool_span.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
}
],
"returnComment": [],
"initialIsOpen": false
},
{
"parentPluginId": "inference",
"id": "def-server.withInferenceSpan",
"type": "Function",
"tags": [],
"label": "withInferenceSpan",
"description": [
"\nWraps a callback in an active span. If the callback returns an Observable\nor Promise, it will set the span status to the appropriate value when the\nasync operation completes."
],
"signature": [
"(options: string | ({ name: string; } & ",
"GenAISemConvAttributes",
"), cb: (span?: ",
"Span",
" | undefined) => T) => T"
],
"path": "x-pack/platform/plugins/shared/inference/server/tracing/with_inference_span.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "inference",
"id": "def-server.withInferenceSpan.$1",
"type": "CompoundType",
"tags": [],
"label": "options",
"description": [],
"signature": [
"string | ({ name: string; } & ",
"GenAISemConvAttributes",
")"
],
"path": "x-pack/platform/plugins/shared/inference/server/tracing/with_inference_span.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
},
{
"parentPluginId": "inference",
"id": "def-server.withInferenceSpan.$2",
"type": "Function",
"tags": [],
"label": "cb",
"description": [],
"signature": [
"(span?: ",
"Span",
" | undefined) => T"
],
"path": "x-pack/platform/plugins/shared/inference/server/tracing/with_inference_span.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
}
],
"returnComment": [],
"initialIsOpen": false
}
],
"interfaces": [
{
"parentPluginId": "inference",
"id": "def-server.BoundInferenceClient",
"type": "Interface",
"tags": [],
"label": "BoundInferenceClient",
"description": [
"\nA version of the {@link InferenceClient} that is pre-bound to a set of parameters."
],
"path": "x-pack/platform/plugins/shared/inference/server/inference_client/types.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "inference",
"id": "def-server.BoundInferenceClient.chatComplete",
"type": "Function",
"tags": [],
"label": "chatComplete",
"description": [
"\n`chatComplete` requests the LLM to generate a response to\na prompt or conversation, which might be plain text\nor a tool call, or a combination of both."
],
"signature": [
"<TToolOptions extends ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ToolOptions",
"text": "ToolOptions"
},
"<string> = ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ToolOptions",
"text": "ToolOptions"
},
"<string>, TStream extends boolean = false>(options: ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.UnboundChatCompleteOptions",
"text": "UnboundChatCompleteOptions"
},
"<TToolOptions, TStream>) => ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ChatCompleteCompositeResponse",
"text": "ChatCompleteCompositeResponse"
},
"<TToolOptions, TStream>"
],
"path": "x-pack/platform/plugins/shared/inference/server/inference_client/types.ts",
"deprecated": false,
"trackAdoption": false,
"returnComment": [],
"children": [
{
"parentPluginId": "inference",
"id": "def-server.BoundInferenceClient.chatComplete.$1",
"type": "Object",
"tags": [],
"label": "options",
"description": [],
"signature": [
"{ [P in \"abortSignal\" | \"metadata\" | \"temperature\" | \"system\" | \"stream\" | \"messages\" | \"modelName\" | \"maxRetries\" | \"retryConfiguration\" | Exclude<keyof TToolOptions, \"connectorId\" | \"functionCalling\">]: ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ChatCompleteOptions",
"text": "ChatCompleteOptions"
},
"<TToolOptions, TStream>[P]; }"
],
"path": "x-pack/platform/packages/shared/ai-infra/inference-common/src/chat_complete/bound_api.ts",
"deprecated": false,
"trackAdoption": false
}
]
},
{
"parentPluginId": "inference",
"id": "def-server.BoundInferenceClient.output",
"type": "Function",
"tags": [],
"label": "output",
"description": [
"\n`output` asks the LLM to generate a structured (JSON)\nresponse based on a schema and a prompt or conversation."
],
"signature": [
"<TId extends string = string, TOutputSchema extends ",
"ToolSchemaTypeObject",
" | undefined = ",
"ToolSchemaTypeObject",
" | undefined, TStream extends boolean = false>(options: ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.UnboundOutputOptions",
"text": "UnboundOutputOptions"
},
"<TId, TOutputSchema, TStream>) => ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.OutputCompositeResponse",
"text": "OutputCompositeResponse"
},
"<TId, TOutputSchema, TStream>"
],
"path": "x-pack/platform/plugins/shared/inference/server/inference_client/types.ts",
"deprecated": false,
"trackAdoption": false,
"returnComment": [],
"children": [
{
"parentPluginId": "inference",
"id": "def-server.BoundInferenceClient.output.$1",
"type": "Object",
"tags": [],
"label": "options",
"description": [],
"signature": [
"{ id: TId; abortSignal?: AbortSignal | undefined; input: string; metadata?: ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ChatCompleteMetadata",
"text": "ChatCompleteMetadata"
},
" | undefined; schema?: TOutputSchema | undefined; retry?: { onValidationError?: number | boolean | undefined; } | undefined; system?: string | undefined; stream?: TStream | undefined; modelName?: string | undefined; maxRetries?: number | undefined; retryConfiguration?: ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ChatCompleteRetryConfiguration",
"text": "ChatCompleteRetryConfiguration"
},
" | undefined; previousMessages?: ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.Message",
"text": "Message"
},
"[] | undefined; }"
],
"path": "x-pack/platform/packages/shared/ai-infra/inference-common/src/output/bound_api.ts",
"deprecated": false,
"trackAdoption": false
}
]
},
{
"parentPluginId": "inference",
"id": "def-server.BoundInferenceClient.getConnectorById",
"type": "Function",
"tags": [],
"label": "getConnectorById",
"description": [
"\n`getConnectorById` returns an inference connector by id.\nNon-inference connectors will throw an error."
],
"signature": [
"(id: string) => Promise<",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.InferenceConnector",
"text": "InferenceConnector"
},
">"
],
"path": "x-pack/platform/plugins/shared/inference/server/inference_client/types.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "inference",
"id": "def-server.BoundInferenceClient.getConnectorById.$1",
"type": "string",
"tags": [],
"label": "id",
"description": [],
"signature": [
"string"
],
"path": "x-pack/platform/plugins/shared/inference/server/inference_client/types.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
}
],
"returnComment": []
}
],
"initialIsOpen": false
},
{
"parentPluginId": "inference",
"id": "def-server.InferenceClient",
"type": "Interface",
"tags": [],
"label": "InferenceClient",
"description": [
"\nAn inference client, scoped to a request, that can be used to interact with LLMs."
],
"path": "x-pack/platform/plugins/shared/inference/server/inference_client/types.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "inference",
"id": "def-server.InferenceClient.chatComplete",
"type": "Function",
"tags": [],
"label": "chatComplete",
"description": [
"\n`chatComplete` requests the LLM to generate a response to\na prompt or conversation, which might be plain text\nor a tool call, or a combination of both."
],
"signature": [
"<TToolOptions extends ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ToolOptions",
"text": "ToolOptions"
},
"<string> = ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ToolOptions",
"text": "ToolOptions"
},
"<string>, TStream extends boolean = false>(options: ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ChatCompleteOptions",
"text": "ChatCompleteOptions"
},
"<TToolOptions, TStream>) => ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ChatCompleteCompositeResponse",
"text": "ChatCompleteCompositeResponse"
},
"<TToolOptions, TStream>"
],
"path": "x-pack/platform/plugins/shared/inference/server/inference_client/types.ts",
"deprecated": false,
"trackAdoption": false,
"returnComment": [],
"children": [
{
"parentPluginId": "inference",
"id": "def-server.InferenceClient.chatComplete.$1",
"type": "CompoundType",
"tags": [],
"label": "options",
"description": [],
"signature": [
"{ connectorId: string; stream?: TStream | undefined; system?: string | undefined; messages: ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.Message",
"text": "Message"
},
"[]; temperature?: number | undefined; modelName?: string | undefined; functionCalling?: ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.FunctionCallingMode",
"text": "FunctionCallingMode"
},
" | undefined; abortSignal?: AbortSignal | undefined; metadata?: ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ChatCompleteMetadata",
"text": "ChatCompleteMetadata"
},
" | undefined; maxRetries?: number | undefined; retryConfiguration?: ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ChatCompleteRetryConfiguration",
"text": "ChatCompleteRetryConfiguration"
},
" | undefined; } & TToolOptions"
],
"path": "x-pack/platform/packages/shared/ai-infra/inference-common/src/chat_complete/api.ts",
"deprecated": false,
"trackAdoption": false
}
]
},
{
"parentPluginId": "inference",
"id": "def-server.InferenceClient.output",
"type": "Function",
"tags": [],
"label": "output",
"description": [
"\n`output` asks the LLM to generate a structured (JSON)\nresponse based on a schema and a prompt or conversation."
],
"signature": [
"<TId extends string = string, TOutputSchema extends ",
"ToolSchemaTypeObject",
" | undefined = ",
"ToolSchemaTypeObject",
" | undefined, TStream extends boolean = false>(options: ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.OutputOptions",
"text": "OutputOptions"
},
"<TId, TOutputSchema, TStream>) => ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.OutputCompositeResponse",
"text": "OutputCompositeResponse"
},
"<TId, TOutputSchema, TStream>"
],
"path": "x-pack/platform/plugins/shared/inference/server/inference_client/types.ts",
"deprecated": false,
"trackAdoption": false,
"returnComment": [],
"children": [
{
"parentPluginId": "inference",
"id": "def-server.InferenceClient.output.$1",
"type": "Object",
"tags": [],
"label": "options",
"description": [],
"signature": [
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.OutputOptions",
"text": "OutputOptions"
},
"<TId, TOutputSchema, TStream>"
],
"path": "x-pack/platform/packages/shared/ai-infra/inference-common/src/output/api.ts",
"deprecated": false,
"trackAdoption": false
}
]
},
{
"parentPluginId": "inference",
"id": "def-server.InferenceClient.getConnectorById",
"type": "Function",
"tags": [],
"label": "getConnectorById",
"description": [
"\n`getConnectorById` returns an inference connector by id.\nNon-inference connectors will throw an error."
],
"signature": [
"(id: string) => Promise<",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.InferenceConnector",
"text": "InferenceConnector"
},
">"
],
"path": "x-pack/platform/plugins/shared/inference/server/inference_client/types.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "inference",
"id": "def-server.InferenceClient.getConnectorById.$1",
"type": "string",
"tags": [],
"label": "id",
"description": [],
"signature": [
"string"
],
"path": "x-pack/platform/plugins/shared/inference/server/inference_client/types.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
}
],
"returnComment": []
}
],
"initialIsOpen": false
}
],
"enums": [],
"misc": [],
"objects": [],
"setup": {
"parentPluginId": "inference",
"id": "def-server.InferenceServerSetup",
"type": "Interface",
"tags": [],
"label": "InferenceServerSetup",
"description": [
"\nSetup contract of the inference plugin."
],
"path": "x-pack/platform/plugins/shared/inference/server/types.ts",
"deprecated": false,
"trackAdoption": false,
"children": [],
"lifecycle": "setup",
"initialIsOpen": true
},
"start": {
"parentPluginId": "inference",
"id": "def-server.InferenceServerStart",
"type": "Interface",
"tags": [],
"label": "InferenceServerStart",
"description": [
"\nStart contract of the inference plugin, exposing APIs to interact with LLMs."
],
"path": "x-pack/platform/plugins/shared/inference/server/types.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "inference",
"id": "def-server.InferenceServerStart.getClient",
"type": "Function",
"tags": [],
"label": "getClient",
"description": [
"\nCreates an {@link InferenceClient}, scoped to a request.\n"
],
"signature": [
"<T extends ",
"InferenceClientCreateOptions",
">(options: T) => T extends ",
"InferenceBoundClientCreateOptions",
" ? ",
{
"pluginId": "inference",
"scope": "server",
"docId": "kibInferencePluginApi",
"section": "def-server.BoundInferenceClient",
"text": "BoundInferenceClient"
},
" : ",
{
"pluginId": "inference",
"scope": "server",
"docId": "kibInferencePluginApi",
"section": "def-server.InferenceClient",
"text": "InferenceClient"
}
],
"path": "x-pack/platform/plugins/shared/inference/server/types.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "inference",
"id": "def-server.InferenceServerStart.getClient.$1",
"type": "Uncategorized",
"tags": [],
"label": "options",
"description": [],
"signature": [
"T"
],
"path": "x-pack/platform/plugins/shared/inference/server/types.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
}
],
"returnComment": []
},
{
"parentPluginId": "inference",
"id": "def-server.InferenceServerStart.getChatModel",
"type": "Function",
"tags": [],
"label": "getChatModel",
"description": [
"\nCreates a langchain {@link InferenceChatModel} that will be using the inference framework\nunder the hood.\n"
],
"signature": [
"(options: ",
"CreateChatModelOptions",
") => Promise<",
{
"pluginId": "@kbn/inference-langchain",
"scope": "common",
"docId": "kibKbnInferenceLangchainPluginApi",
"section": "def-common.InferenceChatModel",
"text": "InferenceChatModel"
},
">"
],
"path": "x-pack/platform/plugins/shared/inference/server/types.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "inference",
"id": "def-server.InferenceServerStart.getChatModel.$1",
"type": "Object",
"tags": [],
"label": "options",
"description": [],
"signature": [
"CreateChatModelOptions"
],
"path": "x-pack/platform/plugins/shared/inference/server/types.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
}
],
"returnComment": []
}
],
"lifecycle": "start",
"initialIsOpen": true
}
},
"common": {
"classes": [],
"functions": [
{
"parentPluginId": "inference",
"id": "def-common.correctCommonEsqlMistakes",
"type": "Function",
"tags": [],
"label": "correctCommonEsqlMistakes",
"description": [
"\nCorrect some common ES|QL syntax and grammar mistakes that LLM can potentially do.\n\nCorrecting the query is done in two steps:\n1. we try to correct the *syntax*, without AST (given it requires a valid syntax)\n2. we try to correct the *grammar*, using AST this time."
],
"signature": [
"(query: string) => { input: string; output: string; isCorrection: boolean; }"
],
"path": "x-pack/platform/plugins/shared/inference/common/tasks/nl_to_esql/correct_esql_query.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "inference",
"id": "def-common.correctCommonEsqlMistakes.$1",
"type": "string",
"tags": [],
"label": "query",
"description": [],
"signature": [
"string"
],
"path": "x-pack/platform/plugins/shared/inference/common/tasks/nl_to_esql/correct_esql_query.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
}
],
"returnComment": [],
"initialIsOpen": false
},
{
"parentPluginId": "inference",
"id": "def-common.createOutputApi",
"type": "Function",
"tags": [],
"label": "createOutputApi",
"description": [],
"signature": [
"(chatCompleteApi: ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ChatCompleteAPI",
"text": "ChatCompleteAPI"
},
") => ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.OutputAPI",
"text": "OutputAPI"
}
],
"path": "x-pack/platform/plugins/shared/inference/common/output/create_output_api.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "inference",
"id": "def-common.createOutputApi.$1",
"type": "Function",
"tags": [],
"label": "chatCompleteApi",
"description": [],
"signature": [
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ChatCompleteAPI",
"text": "ChatCompleteAPI"
}
],
"path": "x-pack/platform/plugins/shared/inference/common/output/create_output_api.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
}
],
"returnComment": [],
"initialIsOpen": false
},
{
"parentPluginId": "inference",
"id": "def-common.createOutputApi",
"type": "Function",
"tags": [],
"label": "createOutputApi",
"description": [],
"signature": [
"(chatCompleteApi: ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ChatCompleteAPI",
"text": "ChatCompleteAPI"
},
") => ({ id, connectorId, input, schema, system, previousMessages, modelName, functionCalling, stream, abortSignal, maxRetries, retryConfiguration, metadata, retry, }: DefaultOutputOptions) => Promise<",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.OutputResponse",
"text": "OutputResponse"
},
"<string, ",
"AugmentedRequired",
"<{ [x: string]: string | number | boolean | ",
"AugmentedRequired",
"<any, never> | FromToolSchemaArray<ToolSchemaTypeArray> | undefined; }, never> | undefined>> | ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.OutputStreamResponse",
"text": "OutputStreamResponse"
},
"<string, ",
"ToolSchemaTypeObject",
" | undefined>"
],
"path": "x-pack/platform/plugins/shared/inference/common/output/create_output_api.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "inference",
"id": "def-common.createOutputApi.$1",
"type": "Function",
"tags": [],
"label": "chatCompleteApi",
"description": [],
"signature": [
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ChatCompleteAPI",
"text": "ChatCompleteAPI"
}
],
"path": "x-pack/platform/plugins/shared/inference/common/output/create_output_api.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
}
],
"returnComment": [],
"initialIsOpen": false
},
{
"parentPluginId": "inference",
"id": "def-common.generateFakeToolCallId",
"type": "Function",
"tags": [],
"label": "generateFakeToolCallId",
"description": [],
"signature": [
"() => string"
],
"path": "x-pack/platform/plugins/shared/inference/common/utils/generate_fake_tool_call_id.ts",
"deprecated": false,
"trackAdoption": false,
"children": [],
"returnComment": [],
"initialIsOpen": false
},
{
"parentPluginId": "inference",
"id": "def-common.splitIntoCommands",
"type": "Function",
"tags": [],
"label": "splitIntoCommands",
"description": [],
"signature": [
"(query: string) => { name: string | undefined; command: string; }[]"
],
"path": "x-pack/platform/plugins/shared/inference/common/tasks/nl_to_esql/non_ast/correct_common_esql_mistakes.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "inference",
"id": "def-common.splitIntoCommands.$1",
"type": "string",
"tags": [],
"label": "query",
"description": [],
"signature": [
"string"
],
"path": "x-pack/platform/plugins/shared/inference/common/tasks/nl_to_esql/non_ast/correct_common_esql_mistakes.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
}
],
"returnComment": [],
"initialIsOpen": false
}
],
"interfaces": [
{
"parentPluginId": "inference",
"id": "def-common.GetConnectorsResponseBody",
"type": "Interface",
"tags": [],
"label": "GetConnectorsResponseBody",
"description": [],
"path": "x-pack/platform/plugins/shared/inference/common/http_apis.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "inference",
"id": "def-common.GetConnectorsResponseBody.connectors",
"type": "Array",
"tags": [],
"label": "connectors",
"description": [],
"signature": [
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.InferenceConnector",
"text": "InferenceConnector"
},
"[]"
],
"path": "x-pack/platform/plugins/shared/inference/common/http_apis.ts",
"deprecated": false,
"trackAdoption": false
}
],
"initialIsOpen": false
}
],
"enums": [],
"misc": [
{
"parentPluginId": "inference",
"id": "def-common.ChatCompleteRequestBody",
"type": "Type",
"tags": [],
"label": "ChatCompleteRequestBody",
"description": [],
"signature": [
"{ connectorId: string; system?: string | undefined; temperature?: number | undefined; modelName?: string | undefined; messages: ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.Message",
"text": "Message"
},
"[]; functionCalling?: ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.FunctionCallingMode",
"text": "FunctionCallingMode"
},
" | undefined; maxRetries?: number | undefined; retryConfiguration?: { retryOn?: \"all\" | \"auto\" | undefined; } | undefined; } & ",
{
"pluginId": "@kbn/inference-common",
"scope": "common",
"docId": "kibKbnInferenceCommonPluginApi",
"section": "def-common.ToolOptions",
"text": "ToolOptions"
},
"<string>"
],
"path": "x-pack/platform/plugins/shared/inference/common/http_apis.ts",
"deprecated": false,
"trackAdoption": false,
"initialIsOpen": false
}
],
"objects": []
}
}