Embedding

AI Services

/ Embedding, / Configuration, / Ai, / Chat

AI services are the external, OpenAI-compatible model endpoints behind server-side inference — schema-driven text→vector derivation, text vector queries, the semantic query and the /_embedding API on the embedding side, and the POST /_chat generation facade on the other. Every service speaks the OpenAI wire format: the embeddings API (POST {url} with {"model", "input": [...]} and a bearer key), and — once it lists generation models — the chat-completions API at its chat_url.

...

semantic_text — one-field semantic search

/ Semantic, / Embedding, / Schema

semantic_text — one-field semantic search #

Semantic search used to mean wiring two fields: a text field for the source, a dense_vector field with vector_options pointing back at it. The semantic_text field type collapses all of that into one declaration:

PUT /my-collection
{
  "schema": {
    "properties": {
      "body": {
        "type": "semantic_text",
        "service": "zai",
        "model": "GLM-4.6V",
        "dims": 3072
      }
    }
  }
}

From there everything derives. Writes carry plain text — the vector is embedded server-side at write time, in bulk and after partial updates alike. Search needs no field names and no vectors:

...

Model features & the /_chat facade

/ Ai, / Embedding, / Chat

Model features & the /_chat facade #

Every model in the AI-services registry can now declare what it is for and what it accepts — features (embedding or generation) and inputs (text or image). The two axes are orthogonal: “multimodal” is not a category of its own but an inputs list beyond text.

node:
  embedding:
    endpoints:
      - name: zai
        url: https://api.z.ai/api/coding/paas/v4/embeddings
        chat_url: https://api.z.ai/api/coding/paas/v4/chat/completions
        api_key: sk-…
        models:
          - embedding-3                                   # embedding + text (the defaults)
          - {id: GLM-4.6V, dims: 3072}                    # embedding, dims declared
          - {id: glm-4-flash, features: [generation]}     # text generation
          - {id: glm-4v, features: [generation], inputs: [text, image]}   # vision LLM
          - {id: clip-v2, features: [embedding], inputs: [text, image]}   # multimodal embedder

Omitted fields keep the historical defaults, so every existing plain-string listing still means embedding + text — nothing to migrate.

...