模型调用 · 向量化与重排 API (0.1.0)

Download OpenAPI specification:

Public HTTP contract derived from the current route signatures and Pydantic request models. Internal /api/private routes are excluded. Dynamic controller results remain an open JSON schema.

Small Model Reranker

The configured max_documents limits the number of input documents per request. When exceeded, returns HTTP 400 with code ModelFactory.ExternalSmallModel.Used.InvalidParameter before calling the provider. Documents are never truncated or split. Unconfigured limits retain the previous behavior. The registered model type must be reranker; a mismatch returns HTTP 400 with code ModelFactory.ExternalSmallModel.Used.InvalidParameter before any provider or adapter call. Successful results are returned without a FastAPI response_model.

Authorizations:
BearerAuth
Request Body schema: application/json
required

JSON request accepted by the implemented handler signature. Dictionary fields are validated by the controller.

model
string (Model)

Model name

query
required
string (Query)

Query to rank against; must not be blank

documents
required
Array of any (Documents) non-empty

Documents to rank; must not be empty

model_id
string (Model Id)
Default: ""

Model ID

Responses

Request samples

Content type
application/json
{
  • "model": "string",
  • "query": "string",
  • "documents": [
    ],
  • "model_id": ""
}

Response samples

Content type
application/json
null

Small Model Embedding

The registered model type must be embedding; a mismatch returns HTTP 400 with code ModelFactory.ExternalSmallModel.Used.InvalidParameter before any provider or adapter call. Successful provider and adapter responses must contain a non-empty data array of non-empty numeric embedding vectors. Invalid output returns HTTP 502 with code ModelFactory.ExternalSmallModel.Used.InvalidResponse. Provider extension fields are preserved.

Authorizations:
BearerAuth
Request Body schema: application/json
required

JSON request accepted by the implemented handler signature. Dictionary fields are validated by the controller.

model
string (Model)

Model name

input
required
Array of any (Input) non-empty

Content to embed; must not be empty

model_id
string (Model Id)
Default: ""

Model ID

Responses

Request samples

Content type
application/json
{
  • "model": "string",
  • "input": [
    ],
  • "model_id": ""
}

Response samples

Content type
application/json
null

Small Model Embeddings

The registered model type must be embedding; a mismatch returns HTTP 400 with code ModelFactory.ExternalSmallModel.Used.InvalidParameter before any provider or adapter call. Successful provider and adapter responses must contain a non-empty data array of non-empty numeric embedding vectors. Invalid output returns HTTP 502 with code ModelFactory.ExternalSmallModel.Used.InvalidResponse. Provider extension fields are preserved.

Authorizations:
BearerAuth
Request Body schema: application/json
required

JSON request accepted by the implemented handler signature. Dictionary fields are validated by the controller.

model
string (Model)

Model name

input
required
Array of any (Input) non-empty

Content to embed; must not be empty

model_id
string (Model Id)
Default: ""

Model ID

Responses

Request samples

Content type
application/json
{
  • "model": "string",
  • "input": [
    ],
  • "model_id": ""
}

Response samples

Content type
application/json
null