Files
elasticsearch-js/docs/reference-shared-types-inference.asciidoc

274 lines
6.8 KiB
Plaintext

[[reference-shared-types-inference]]
////////
===========================================================================================================================
|| ||
|| ||
|| ||
|| ██████╗ ███████╗ █████╗ ██████╗ ███╗ ███╗███████╗ ||
|| ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝ ||
|| ██████╔╝█████╗ ███████║██║ ██║██╔████╔██║█████╗ ||
|| ██╔══██╗██╔══╝ ██╔══██║██║ ██║██║╚██╔╝██║██╔══╝ ||
|| ██║ ██║███████╗██║ ██║██████╔╝██║ ╚═╝ ██║███████╗ ||
|| ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝ ||
|| ||
|| ||
|| This file is autogenerated, DO NOT send pull requests that changes this file directly. ||
|| You should update the script that does the generation, which can be found in: ||
|| https://github.com/elastic/elastic-client-generator-js ||
|| ||
|| You can run the script with the following command: ||
|| npm run elasticsearch -- --version <version> ||
|| ||
|| ||
|| ||
===========================================================================================================================
////////
== Shared Inference types
[discrete]
[[InferenceCompletionResult]]
=== InferenceCompletionResult
[pass]
++++
<pre>
++++
interface InferenceCompletionResult {
result: string
}
[pass]
++++
</pre>
++++
[discrete]
[[InferenceDeleteInferenceEndpointResult]]
=== InferenceDeleteInferenceEndpointResult
[pass]
++++
<pre>
++++
interface InferenceDeleteInferenceEndpointResult extends <<AcknowledgedResponseBase>> {
pipelines: string[]
}
[pass]
++++
</pre>
++++
[discrete]
[[InferenceDenseByteVector]]
=== InferenceDenseByteVector
[pass]
++++
<pre>
++++
type InferenceDenseByteVector = <<byte>>[]
[pass]
++++
</pre>
++++
[discrete]
[[InferenceDenseVector]]
=== InferenceDenseVector
[pass]
++++
<pre>
++++
type InferenceDenseVector = <<float>>[]
[pass]
++++
</pre>
++++
[discrete]
[[InferenceInferenceEndpoint]]
=== InferenceInferenceEndpoint
[pass]
++++
<pre>
++++
interface InferenceInferenceEndpoint {
pass:[/**] @property service The service type */
service: string
pass:[/**] @property service_settings <<Settings>> specific to the service */
service_settings: <<InferenceServiceSettings>>
pass:[/**] @property task_settings Task settings specific to the service and task type */
task_settings?: <<InferenceTaskSettings>>
}
[pass]
++++
</pre>
++++
[discrete]
[[InferenceInferenceEndpointInfo]]
=== InferenceInferenceEndpointInfo
[pass]
++++
<pre>
++++
interface InferenceInferenceEndpointInfo extends <<InferenceInferenceEndpoint>> {
pass:[/**] @property inference_id The inference <<Id>> */
inference_id: string
pass:[/**] @property task_type The task type */
task_type: <<InferenceTaskType>>
}
[pass]
++++
</pre>
++++
[discrete]
[[InferenceInferenceResult]]
=== InferenceInferenceResult
[pass]
++++
<pre>
++++
interface InferenceInferenceResult {
text_embedding_bytes?: <<InferenceTextEmbeddingByteResult>>[]
text_embedding?: <<InferenceTextEmbeddingResult>>[]
sparse_embedding?: <<InferenceSparseEmbeddingResult>>[]
completion?: <<InferenceCompletionResult>>[]
rerank?: <<InferenceRankedDocument>>[]
}
[pass]
++++
</pre>
++++
[discrete]
[[InferenceRankedDocument]]
=== InferenceRankedDocument
[pass]
++++
<pre>
++++
interface InferenceRankedDocument {
index: <<integer>>
score: <<float>>
text?: string
}
[pass]
++++
</pre>
++++
[discrete]
[[InferenceServiceSettings]]
=== InferenceServiceSettings
[pass]
++++
<pre>
++++
type InferenceServiceSettings = any
[pass]
++++
</pre>
++++
[discrete]
[[InferenceSparseEmbeddingResult]]
=== InferenceSparseEmbeddingResult
[pass]
++++
<pre>
++++
interface InferenceSparseEmbeddingResult {
embedding: <<InferenceSparseVector>>
}
[pass]
++++
</pre>
++++
[discrete]
[[InferenceSparseVector]]
=== InferenceSparseVector
[pass]
++++
<pre>
++++
type InferenceSparseVector = Record<string, <<float>>>
[pass]
++++
</pre>
++++
[discrete]
[[InferenceTaskSettings]]
=== InferenceTaskSettings
[pass]
++++
<pre>
++++
type InferenceTaskSettings = any
[pass]
++++
</pre>
++++
[discrete]
[[InferenceTaskType]]
=== InferenceTaskType
[pass]
++++
<pre>
++++
type InferenceTaskType = 'sparse_embedding' | 'text_embedding' | 'rerank' | 'completion'
[pass]
++++
</pre>
++++
[discrete]
[[InferenceTextEmbeddingByteResult]]
=== InferenceTextEmbeddingByteResult
[pass]
++++
<pre>
++++
interface InferenceTextEmbeddingByteResult {
embedding: <<InferenceDenseByteVector>>
}
[pass]
++++
</pre>
++++
[discrete]
[[InferenceTextEmbeddingResult]]
=== InferenceTextEmbeddingResult
[pass]
++++
<pre>
++++
interface InferenceTextEmbeddingResult {
embedding: <<InferenceDenseVector>>
}
[pass]
++++
</pre>
++++