Class OllamaGenerateRequest
Request model for Ollama's /api/generate endpoint (legacy completion, non-chat).
Implements
Inherited Members
Namespace: Glitch9.AIDevKit.Ollama
Assembly: Glitch9.AIDevKit.Provider.Ollama.dll
Syntax
public class OllamaGenerateRequest : IJsonRequest
Properties
| Edit this page View SourceInstructions
Optional. The system message to use for the model.
Declaration
[JsonProperty("instructions")]
public string Instructions { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
MaxTokens
Optional. The maximum number of tokens to generate.
Declaration
[JsonProperty("max_completion_tokens")]
public int? MaxTokens { get; set; }
Property Value
| Type | Description |
|---|---|
| int? |
Model
Required. The name of the model to use.
Declaration
[JsonProperty("model")]
public string Model { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Prompt
Required. The text prompt to complete.
Declaration
[JsonProperty("prompt")]
public string Prompt { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Seed
Optional. Random seed for reproducibility.
Declaration
[JsonProperty("seed")]
public uint? Seed { get; set; }
Property Value
| Type | Description |
|---|---|
| uint? |
Stop
Optional. List of strings that will stop further generation if generated.
Declaration
[JsonProperty("stop")]
public List<string> Stop { get; set; }
Property Value
| Type | Description |
|---|---|
| List<string> |
Stream
Optional. Enable streaming of results. Defaults to false.
Declaration
[JsonProperty("stream")]
public bool? Stream { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
Temperature
Optional. Sampling temperature. Range: 0.0–1.0.
Declaration
[JsonProperty("temperature")]
public float? Temperature { get; set; }
Property Value
| Type | Description |
|---|---|
| float? |
TopP
Optional. Top-p nucleus sampling. Range: 0.0–1.0.
Declaration
[JsonProperty("top_p")]
public float? TopP { get; set; }
Property Value
| Type | Description |
|---|---|
| float? |