Table of Contents

Class ChatRequest

Namespace
AutoGen.Ollama
Assembly
AutoGen.Ollama.dll
public class ChatRequest
Inheritance
ChatRequest
Inherited Members

Properties

Format

the format to return a response in. Currently, the only accepted value is json

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

Property Value

string

KeepAlive

controls how long the model will stay loaded into memory following the request (default: 5m)

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

Property Value

string

Messages

the messages of the chat, this can be used to keep a chat memory

[JsonPropertyName("messages")]
public IList<Message> Messages { get; set; }

Property Value

IList<Message>

Model

(required) the model name

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

Property Value

string

Options

additional model parameters listed in the documentation for the Modelfile such as temperature

[JsonPropertyName("options")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ModelReplyOptions? Options { get; set; }

Property Value

ModelReplyOptions

Stream

if false the response will be returned as a single response object, rather than a stream of objects

[JsonPropertyName("stream")]
public bool Stream { get; set; }

Property Value

bool

Template

the prompt template to use (overrides what is defined in the Modelfile)

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

Property Value

string