OllamaClient.embed

Generates embedding vectors for a batch of text inputs.

  1. JSONValue embed(string model, string input, string keepAlive)
  2. JSONValue embed(string model, string[] inputs, string keepAlive)
    class OllamaClient
    @safe
    JSONValue
    embed
    (
    string model
    ,
    string[] inputs
    ,
    string keepAlive = null
    )

Parameters

model string

Embedding model name.

inputs string[]

Array of texts to embed.

keepAlive string

How long to keep the model loaded.

Return Value

Type: JSONValue

A JSONValue with an "embeddings" array, one vector per input.

Meta