fix: changeoptional field to pointer type (#1907)

* fix:修复在渠道配置中设置模型重定向时,temperature为0被忽略的问题

* fix: set optional fields to pointer type

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
This commit is contained in:
wanthigh
2024-11-09 23:31:46 +08:00
committed by GitHub
parent cbfc983dc3
commit c368232f50
19 changed files with 77 additions and 59 deletions

View File

@@ -16,13 +16,13 @@ type Input struct {
}
type Parameters struct {
TopP float64 `json:"top_p,omitempty"`
TopP *float64 `json:"top_p,omitempty"`
TopK int `json:"top_k,omitempty"`
Seed uint64 `json:"seed,omitempty"`
EnableSearch bool `json:"enable_search,omitempty"`
IncrementalOutput bool `json:"incremental_output,omitempty"`
MaxTokens int `json:"max_tokens,omitempty"`
Temperature float64 `json:"temperature,omitempty"`
Temperature *float64 `json:"temperature,omitempty"`
ResultFormat string `json:"result_format,omitempty"`
Tools []model.Tool `json:"tools,omitempty"`
}