← Back to Gene Catalog

kb-text-embed

Hybrid knowledge.index

OpenAI-compatible text embeddings: batch strings in, vectors out. Host writes vectors to pgvector/Chroma. Keys via apiKeys only.

README

No documentation yet.

Gene authors can add a README when publishing.

Phenotype

Input

PropertyType Req Description
model string Embedding model id (e.g. text-embedding-3-small).
texts array Text chunks to embed; host should batch if corpus is large.
apiKeys object

Output

PropertyType Req Description
model string
vectors array Same order as input texts
dimension integer
Raw JSON Schema

inputSchema

{
  "type": "object",
  "required": [
    "texts",
    "apiKeys"
  ],
  "properties": {
    "model": {
      "type": "string",
      "description": "Embedding model id (e.g. text-embedding-3-small)."
    },
    "texts": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "maxItems": 100,
      "minItems": 1,
      "description": "Text chunks to embed; host should batch if corpus is large."
    },
    "apiKeys": {
      "type": "object",
      "required": [
        "embedding"
      ],
      "properties": {
        "embedding": {
          "type": "object",
          "required": [
            "apiKey"
          ],
          "properties": {
            "apiKey": {
              "type": "string",
              "description": "Bearer token for embedding API"
            },
            "baseUrl": {
              "type": "string",
              "description": "Default https://api.openai.com/v1 if omitted"
            }
          }
        }
      }
    }
  }
}

outputSchema

{
  "type": "object",
  "required": [
    "model",
    "dimension",
    "vectors"
  ],
  "properties": {
    "model": {
      "type": "string"
    },
    "vectors": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number"
        }
      },
      "description": "Same order as input texts"
    },
    "dimension": {
      "type": "integer"
    }
  }
}