Table of Contents

Class GenerateResponseStream

Namespace
OllamaSharp.Models
Assembly
OllamaSharp.dll

The response from the /api/generate endpoint when streaming is enabled

public class GenerateResponseStream
Inheritance
GenerateResponseStream
Derived
Inherited Members

Properties

CompletedSteps

Gets or sets the number of completed steps (experimental, for image generation models only).

[JsonPropertyName("completed")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public long? CompletedSteps { get; set; }

Property Value

long?

CreatedAt

Gets or sets the time the response was generated.

[JsonIgnore]
public DateTimeOffset? CreatedAt { get; set; }

Property Value

DateTimeOffset?

CreatedAtString

Gets or sets the time the response was generated.

[JsonPropertyName("created_at")]
public string? CreatedAtString { get; set; }

Property Value

string

Done

Whether the response is complete

[JsonPropertyName("done")]
public bool Done { get; set; }

Property Value

bool

Image

Gets or sets the base64-encoded generated image (experimental, for image generation models only).

[JsonPropertyName("image")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Image { get; set; }

Property Value

string

Logprobs

Gets or sets the log probabilities of output tokens.

[JsonPropertyName("logprobs")]
public IEnumerable<Logprob>? Logprobs { get; set; }

Property Value

IEnumerable<Logprob>

Model

The model that generated the response

[JsonPropertyName("model")]
public string Model { get; set; }

Property Value

string

Response

The response generated by the model

[JsonPropertyName("response")]
public string Response { get; set; }

Property Value

string

Thinking

Gets or sets the parsed content of the thinking and reasoning. To make this work, enable Think.

[JsonPropertyName("thinking")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Thinking { get; set; }

Property Value

string

TotalSteps

Gets or sets the total number of steps (experimental, for image generation models only).

[JsonPropertyName("total")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public long? TotalSteps { get; set; }

Property Value

long?