Commit 1a0d4b20 by CaIon

feat: add parameter top_k

parent 743b3c52
...@@ -14,6 +14,7 @@ type GeneralOpenAIRequest struct { ...@@ -14,6 +14,7 @@ type GeneralOpenAIRequest struct {
MaxTokens uint `json:"max_tokens,omitempty"` MaxTokens uint `json:"max_tokens,omitempty"`
Temperature float64 `json:"temperature,omitempty"` Temperature float64 `json:"temperature,omitempty"`
TopP float64 `json:"top_p,omitempty"` TopP float64 `json:"top_p,omitempty"`
TopK int `json:"top_k,omitempty"`
Stop any `json:"stop,omitempty"` Stop any `json:"stop,omitempty"`
N int `json:"n,omitempty"` N int `json:"n,omitempty"`
Input any `json:"input,omitempty"` Input any `json:"input,omitempty"`
......
...@@ -25,6 +25,7 @@ func requestOpenAI2Ollama(request dto.GeneralOpenAIRequest) *OllamaRequest { ...@@ -25,6 +25,7 @@ func requestOpenAI2Ollama(request dto.GeneralOpenAIRequest) *OllamaRequest {
Temperature: request.Temperature, Temperature: request.Temperature,
Seed: request.Seed, Seed: request.Seed,
Topp: request.TopP, Topp: request.TopP,
TopK: request.TopK,
Stop: Stop, Stop: Stop,
}, },
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment