harn-hostlib 0.9.21

Opt-in code-intelligence and deterministic-tool host builtins for the Harn VM
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://harnlang.com/schemas/hostlib/embed/top_k.request.json",
  "title": "embed.top_k request",
  "description": "Rank a corpus of strings against a query by cosine similarity, highest first.",
  "type": "object",
  "properties": {
    "query": { "type": "string" },
    "corpus": { "type": "array", "items": { "type": "string" } },
    "k": { "type": "integer", "minimum": 0, "default": 10 },
    "min_score": {
      "type": "number",
      "description": "Drop results whose cosine score is below this threshold."
    }
  },
  "required": ["query", "corpus"],
  "additionalProperties": false
}