sashabaranov / go-openai

OpenAI ChatGPT, GPT-3, GPT-4, DALL·E, Whisper API wrapper for Go
Apache License 2.0
9.25k stars 1.42k forks source link

fix MaxCompletionTokens typo #862

Closed l-winston closed 1 month ago

l-winston commented 1 month ago

Currently API calls to o1 models are broken due to a typo in the json tag of ChatCompletionRequest

This PR corrects the spelling of MaxCompletionsTokens to MaxCompletionTokens and also fixes the json tag max_completion_tokens.

There already exists a similar PR but it doesn't fix all occurrences of the typo.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.04%. Comparing base (774fc9d) to head (0d4db46). Report is 58 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #862 +/- ## ========================================== + Coverage 98.46% 99.04% +0.58% ========================================== Files 24 26 +2 Lines 1364 1461 +97 ========================================== + Hits 1343 1447 +104 + Misses 15 8 -7 Partials 6 6 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

l-winston commented 1 month ago

hey @sashabaranov could you take a look at this PR 😁

sashabaranov commented 1 month ago

Thank you, it seems like this is fixed in an earlier PR! #860

l-winston commented 1 month ago

@sashabaranov that PR did fix the json tag but leaves many typos, which I also fixed.

sashabaranov commented 1 month ago

Ah, got it, thanks!

l-winston commented 1 month ago

@sashabaranov fixed