mirror of
https://github.com/RGBCube/chatgpt.v
synced 2025-07-27 08:47:44 +00:00
chore: reorder fields
This commit is contained in:
parent
645393d31c
commit
8299b9363b
2 changed files with 5 additions and 4 deletions
|
@ -8,7 +8,7 @@ struct Body {
|
||||||
temperature f32
|
temperature f32
|
||||||
top_p f32
|
top_p f32
|
||||||
n u8
|
n u8
|
||||||
stop string
|
stop ?string
|
||||||
presence_penalty f32
|
presence_penalty f32
|
||||||
frequency_penalty f32
|
frequency_penalty f32
|
||||||
best_of int
|
best_of int
|
||||||
|
|
|
@ -49,12 +49,13 @@ pub fn (c Client) generate_multiple(prompt string, n u8, config GenerationConfig
|
||||||
data: dump(json.encode(Body{
|
data: dump(json.encode(Body{
|
||||||
prompt: prompt
|
prompt: prompt
|
||||||
max_tokens: config.max_tokens
|
max_tokens: config.max_tokens
|
||||||
stop: config.stop or { '' }
|
|
||||||
n: n
|
|
||||||
temperature: config.temperature
|
temperature: config.temperature
|
||||||
top_p: config.top_p
|
top_p: config.top_p
|
||||||
frequency_penalty: config.frequency_penalty
|
n: n
|
||||||
|
stop: config.stop
|
||||||
presence_penalty: config.presence_penalty
|
presence_penalty: config.presence_penalty
|
||||||
|
frequency_penalty: config.frequency_penalty
|
||||||
|
best_of: config.best_of
|
||||||
}))
|
}))
|
||||||
)!
|
)!
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue