Skip to content

Commit

Permalink
feat: Updated OpenAPI spec
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and HavenDV committed Jul 29, 2024
1 parent cb0f84f commit dfeb069
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
11 changes: 10 additions & 1 deletion src/libs/Ollama/Generated/Ollama.Models.RequestOptions.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,21 @@ public sealed partial class RequestOptions
public int? TopK { get; set; }

/// <summary>
/// Works together with top-k. A higher value (e.g., 0.95) will lead to more diverse text, while a lower value <br/>
/// Works together with top_k. A higher value (e.g., 0.95) will lead to more diverse text, while a lower value <br/>
/// (e.g., 0.5) will generate more focused and conservative text. (Default: 0.9)
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("top_p")]
public float? TopP { get; set; }

/// <summary>
/// Alternative to the top_p, and aims to ensure a balance of quality and variety. min_p represents the minimum <br/>
/// probability for a token to be considered, relative to the probability of the most likely token. For <br/>
/// example, with min_p=0.05 and the most likely token having a probability of 0.9, logits with a value less <br/>
/// than 0.05*0.9=0.045 are filtered out. (Default: 0.0)
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("min_p")]
public float? MinP { get; set; }

/// <summary>
/// Tail free sampling is used to reduce the impact of less probable tokens from the output. A higher value <br/>
/// (e.g., 2.0) will reduce the impact more, while a value of 1.0 disables this setting. (default: 1)
Expand Down
7 changes: 6 additions & 1 deletion src/libs/Ollama/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,12 @@ components:
nullable: true
top_p:
type: number
description: "Works together with top-k. A higher value (e.g., 0.95) will lead to more diverse text, while a lower value \n(e.g., 0.5) will generate more focused and conservative text. (Default: 0.9)\n"
description: "Works together with top_k. A higher value (e.g., 0.95) will lead to more diverse text, while a lower value \n(e.g., 0.5) will generate more focused and conservative text. (Default: 0.9)\n"
format: float
nullable: true
min_p:
type: number
description: "Alternative to the top_p, and aims to ensure a balance of quality and variety. min_p represents the minimum \nprobability for a token to be considered, relative to the probability of the most likely token. For \nexample, with min_p=0.05 and the most likely token having a probability of 0.9, logits with a value less \nthan 0.05*0.9=0.045 are filtered out. (Default: 0.0)\n"
format: float
nullable: true
tfs_z:
Expand Down

0 comments on commit dfeb069

Please sign in to comment.