Search Results for

    Show / Hide Table of Contents

    Class OllamaGenerateRequest

    Request model for Ollama's /api/generate endpoint (legacy completion, non-chat).

    Inheritance
    object
    OllamaGenerateRequest
    Implements
    IJsonRequest
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Glitch9.AIDevKit.Ollama
    Assembly: Glitch9.AIDevKit.Provider.Ollama.dll
    Syntax
    public class OllamaGenerateRequest : IJsonRequest

    Properties

    | Edit this page View Source

    Instructions

    Optional. The system message to use for the model.

    Declaration
    [JsonProperty("instructions")]
    public string Instructions { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    MaxTokens

    Optional. The maximum number of tokens to generate.

    Declaration
    [JsonProperty("max_completion_tokens")]
    public int? MaxTokens { get; set; }
    Property Value
    Type Description
    int?
    | Edit this page View Source

    Model

    Required. The name of the model to use.

    Declaration
    [JsonProperty("model")]
    public string Model { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Prompt

    Required. The text prompt to complete.

    Declaration
    [JsonProperty("prompt")]
    public string Prompt { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Seed

    Optional. Random seed for reproducibility.

    Declaration
    [JsonProperty("seed")]
    public uint? Seed { get; set; }
    Property Value
    Type Description
    uint?
    | Edit this page View Source

    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>
    | Edit this page View Source

    Stream

    Optional. Enable streaming of results. Defaults to false.

    Declaration
    [JsonProperty("stream")]
    public bool? Stream { get; set; }
    Property Value
    Type Description
    bool?
    | Edit this page View Source

    Temperature

    Optional. Sampling temperature. Range: 0.0–1.0.

    Declaration
    [JsonProperty("temperature")]
    public float? Temperature { get; set; }
    Property Value
    Type Description
    float?
    | Edit this page View Source

    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?

    Implements

    IJsonRequest

    Extension Methods

    ArrayExtensions.ToArrayOrEmpty<T>(T)
    ArrayExtensions.ToArrayOrNull<T>(T)
    EventExtensions.ToDelta<T>(T, string, int, string, bool)
    EventExtensions.ToDone<T>(T, string, int, string)
    EventExtensions.ToEvent<T>(T)
    EventExtensions.UpcastDelta<T1, T2>(T1, string, int, string, bool)
    FallbackExtensions.IsOr<TParent, TChild>(TParent, TChild)
    ResponseCastingExtensions.GetResult<T>(T)
    SystemExtensions.GetName(object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation