Merge 711ede104e7d30ba5bcc60c36f005700355ee92f into d7eb05b9361febead29a74e71ddffc2ebeff5302
This commit is contained in:
commit
0971b6d70a
@ -81,6 +81,7 @@ type ChatCompletionRequest struct {
|
||||
FrequencyPenalty *float64 `json:"frequency_penalty"`
|
||||
PresencePenalty *float64 `json:"presence_penalty"`
|
||||
TopP *float64 `json:"top_p"`
|
||||
NumCtx *int `json:"num_ctx"`
|
||||
ResponseFormat *ResponseFormat `json:"response_format"`
|
||||
Tools []api.Tool `json:"tools"`
|
||||
}
|
||||
@ -475,6 +476,10 @@ func fromChatRequest(r ChatCompletionRequest) (*api.ChatRequest, error) {
|
||||
options["top_p"] = 1.0
|
||||
}
|
||||
|
||||
if r.NumCtx != nil {
|
||||
options["num_ctx"] = *r.NumCtx
|
||||
}
|
||||
|
||||
var format string
|
||||
if r.ResponseFormat != nil && r.ResponseFormat.Type == "json_object" {
|
||||
format = "json"
|
||||
|
Loading…
x
Reference in New Issue
Block a user