Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding new moderation model constants #875

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

Mhjacobs
Copy link
Contributor

@Mhjacobs Mhjacobs commented Oct 10, 2024

Describe the change
This change enables go-openai to use the omni moderation models that are now available to us from openai.
Provide OpenAI documentation link
Provide a relevant API doc from https://platform.openai.com/docs/models/moderation

Describe your solution
These changes define the constants for the new moderation models as specified by openAI, and then puts them into the map of allowed models for the moderation endpoint. I have tested these strings directly against the moderation api to confirm that these requests return a non-error response and specify the same model that is passed in.
Tests
Briefly describe how you have tested these changes. If possible — please add integration tests.
Unit tests, with the addition of the new models.

Copy link

codecov bot commented Oct 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.04%. Comparing base (774fc9d) to head (65da6fc).
Report is 62 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #875      +/-   ##
==========================================
+ 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              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@sashabaranov sashabaranov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@sashabaranov sashabaranov merged commit 21f7134 into sashabaranov:master Oct 14, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants