{
  "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.",
  "type" : "scalar",
  "name" : "text_embedding",
  "description" : "Generates dense vector embeddings from text input using a specified inference endpoint. Use this function to generate query vectors for KNN searches against your vectorized data or others dense vector based operations.",
  "signatures" : [
    {
      "params" : [
        {
          "name" : "text",
          "type" : "keyword",
          "optional" : false,
          "description" : "Text string to generate embeddings from. Must be a non-null literal string value."
        },
        {
          "name" : "inference_id",
          "type" : "keyword",
          "optional" : false,
          "description" : "Identifier of an existing inference endpoint the that will generate the embeddings. The inference endpoint must have the `text_embedding` task type and should use the same model that was used to embed your indexed data.",
          "hint" : {
            "entityType" : "inference_endpoint",
            "constraints" : {
              "task_type" : "text_embedding"
            }
          }
        }
      ],
      "variadic" : false,
      "returnType" : "dense_vector"
    }
  ],
  "examples" : [
    "FROM dense_vector_text METADATA _score\n| WHERE KNN(text_embedding_field, TEXT_EMBEDDING(\"be excellent to each other\", \"test_dense_inference\"))"
  ],
  "preview" : false,
  "snapshot_only" : false
}
