feat(ml): fuse two embedding models and protect the ML service with a token
This commit is contained in:
1 parent
bc00d6901f
commit
b24e5ff906
63 files changed
+2287
-276
No files matched your search
@@ -1,11 +1,10 @@
|
||||
post:
|
||||
operationId: CreateMLEmbeddings
|
||||
summary: Encode texts into normalized vectors with the pinned embedding model.
|
||||
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 no credentials on the private network. The request carries only text that the caller is allowed to process, and the service never logs it.
|
||||
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 answers 503 service_unavailable until the model is loaded from the image and a warm-up encode has finished; `/readyz` reports the same state. 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.
|
||||
security: []
|
||||
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:
|
||||
@@ -23,6 +22,8 @@ post:
|
||||
$ref: ../components/schemas.yml#/EmbeddingResponse
|
||||
"400":
|
||||
$ref: ../components/responses.yml#/Problem
|
||||
"401":
|
||||
$ref: ../components/responses.yml#/Problem
|
||||
"413":
|
||||
$ref: ../components/responses.yml#/Problem
|
||||
"503":
|
||||
|
||||
Reference in new issue
Block a user