33 lines
1.7 KiB
YAML
33 lines
1.7 KiB
YAML
post:
|
|
operationId: CreateMLEmbeddings
|
|
summary: Encode texts into normalized vectors with a pinned embedding model.
|
|
description: |-
|
|
Internal operation for the Go backend; it is not reachable from browsers and needs the service bearer token. The request carries only text that the caller is allowed to process, and the service never logs it.
|
|
|
|
The service may load several pinned models, for example the members of an ensemble; `model` selects one, and the response names the model, revision, dimension, and prompt version that produced the vectors. The service answers 503 service_unavailable until every configured model is loaded and a warm-up encode has finished, and when the device runs out of memory for a request; `/readyz` reports the same state. A request without a valid token answers 401, a request above the body limit answers 413, and a request that breaks the schema, such as too many texts or a text over 8000 characters, or names a model that the service does not serve, answers 400.
|
|
tags:
|
|
- inference
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas.yml#/EmbeddingRequest
|
|
responses:
|
|
"200":
|
|
description: One vector for each text, in request order.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas.yml#/EmbeddingResponse
|
|
"400":
|
|
$ref: ../components/responses.yml#/Problem
|
|
"401":
|
|
$ref: ../components/responses.yml#/Problem
|
|
"413":
|
|
$ref: ../components/responses.yml#/Problem
|
|
"503":
|
|
$ref: ../components/responses.yml#/Problem
|
|
default:
|
|
$ref: ../components/responses.yml#/Problem
|