1
Fork 0
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:
RGBCube 2023-01-14 14:11:06 +03:00
parent 645393d31c
commit 8299b9363b
2 changed files with 5 additions and 4 deletions

View file

@ -8,7 +8,7 @@ struct Body {
temperature f32
top_p f32
n u8
stop string
stop ?string
presence_penalty f32
frequency_penalty f32
best_of int

View file

@ -49,12 +49,13 @@ pub fn (c Client) generate_multiple(prompt string, n u8, config GenerationConfig
data: dump(json.encode(Body{
prompt: prompt
max_tokens: config.max_tokens
stop: config.stop or { '' }
n: n
temperature: config.temperature
top_p: config.top_p
frequency_penalty: config.frequency_penalty
n: n
stop: config.stop
presence_penalty: config.presence_penalty
frequency_penalty: config.frequency_penalty
best_of: config.best_of
}))
)!
}