openai: fix "presence_penalty" typo and add test (#6665)

This commit is contained in:
frob 2024-09-06 10:16:28 +02:00 committed by GitHub
parent 608e87bf87
commit fe91d7fff1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 45 additions and 3 deletions

View file

@ -79,7 +79,7 @@ type ChatCompletionRequest struct {
Stop any `json:"stop"`
Temperature *float64 `json:"temperature"`
FrequencyPenalty *float64 `json:"frequency_penalty"`
PresencePenalty *float64 `json:"presence_penalty_penalty"`
PresencePenalty *float64 `json:"presence_penalty"`
TopP *float64 `json:"top_p"`
ResponseFormat *ResponseFormat `json:"response_format"`
Tools []api.Tool `json:"tools"`