mirror of
https://github.com/mudler/LocalAI.git
synced 2025-06-29 22:20:43 +00:00
swap devbox again, broken momentarily due to codegen, investigate multiple allOf hierarchy
This commit is contained in:
parent
c24044d6a1
commit
0ee645e091
8 changed files with 108 additions and 161 deletions
|
@ -168,12 +168,15 @@ func (sc SpecificConfig[RequestModel]) ToPredictOptions() []llama.PredictOption
|
|||
llamaOpts = append(llamaOpts, llama.SetPenalty(float64(*req.FrequencyPenalty))) // CAST
|
||||
}
|
||||
|
||||
if stop0, err := req.Stop.AsCreateChatCompletionRequestStop0(); err == nil {
|
||||
llamaOpts = append(llamaOpts, llama.SetStopWords(stop0))
|
||||
}
|
||||
if req.Stop != nil {
|
||||
|
||||
if stop1, err := req.Stop.AsCreateChatCompletionRequestStop1(); err == nil && len(stop1) > 0 {
|
||||
llamaOpts = append(llamaOpts, llama.SetStopWords(stop1...))
|
||||
if stop0, err := req.Stop.AsCreateChatCompletionRequestStop0(); err == nil {
|
||||
llamaOpts = append(llamaOpts, llama.SetStopWords(stop0))
|
||||
}
|
||||
|
||||
if stop1, err := req.Stop.AsCreateChatCompletionRequestStop1(); err == nil && len(stop1) > 0 {
|
||||
llamaOpts = append(llamaOpts, llama.SetStopWords(stop1...))
|
||||
}
|
||||
}
|
||||
|
||||
if req.XLocalaiExtensions != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue