Class EmbedRequest
- Namespace
- OllamaSharp.Models
- Assembly
- OllamaSharp.dll
Generate embeddings from a model.
public class EmbedRequest : OllamaRequest
- Inheritance
-
EmbedRequest
- Inherited Members
Properties
Dimensions
Number of dimensions for the embedding.
[JsonPropertyName("dimensions")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? Dimensions { get; set; }
Property Value
- int?
Input
The text to generate embeddings for
[JsonPropertyName("input")]
public List<string> Input { get; set; }
Property Value
KeepAlive
Gets or sets the KeepAlive property, which decides how long a given model should stay loaded.
[JsonPropertyName("keep_alive")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? KeepAlive { get; set; }
Property Value
Model
The name of the model to generate embeddings from
[JsonPropertyName("model")]
public string Model { get; set; }
Property Value
Options
Additional model parameters listed in the documentation for the Modelfile such as temperature.
[JsonPropertyName("options")]
public RequestOptions? Options { get; set; }
Property Value
Truncate
Truncates the end of each input to fit within context length. Returns error if false and context length is exceeded. Defaults to true
[JsonPropertyName("truncate")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? Truncate { get; set; }
Property Value
- bool?