Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8e33d23

Browse files
committed
Switch to using pointers for omitempty number fields in ChatCompletionRequest
Signed-off-by: Yoriyasu Yano <430092+yorinasub17@users.noreply.github.com>
1 parentab408b5 commit8e33d23

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎models.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ type ChatCompletionRequest struct {
5050
Messages []ChatCompletionRequestMessage`json:"messages"`
5151

5252
// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic
53-
Temperaturefloat32`json:"temperature,omitempty"`
53+
Temperature*float32`json:"temperature,omitempty"`
5454

5555
// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
56-
TopPfloat32`json:"top_p,omitempty"`
56+
TopP*float32`json:"top_p,omitempty"`
5757

5858
// Number of responses to generate
59-
Nint`json:"n,omitempty"`
59+
N*int`json:"n,omitempty"`
6060

6161
// Whether or not to stream responses back as they are generated
6262
Streambool`json:"stream,omitempty"`
@@ -68,10 +68,10 @@ type ChatCompletionRequest struct {
6868
MaxTokensint`json:"max_tokens,omitempty"`
6969

7070
// (-2, 2) Penalize tokens that haven't appeared yet in the history.
71-
PresencePenaltyfloat32`json:"presence_penalty,omitempty"`
71+
PresencePenalty*float32`json:"presence_penalty,omitempty"`
7272

7373
// (-2, 2) Penalize tokens that appear too frequently in the history.
74-
FrequencyPenaltyfloat32`json:"frequency_penalty,omitempty"`
74+
FrequencyPenalty*float32`json:"frequency_penalty,omitempty"`
7575

7676
// Modify the probability of specific tokens appearing in the completion.
7777
LogitBiasmap[string]float32`json:"logit_bias,omitempty"`

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp