You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The corresponding JsonPropertyNames "self-harm", "sexual/minors", "hate/threatening" and "violence/graphic" within CreateModerationResponse.cs are mapped incorrectly. All eight occurrences within the file are missing their special characters ("-", "/"). This prevents SDK clients from correct decision making based on community guidelines and general terms and services when relying on moderation responses.
Result
Moderation requests with immanent violations currently result in incorrect scores and categories on four out of seven possible properties. The corresponding values either always return "false" or "0.0".
Expected behavior
The received moderation values from the openai-API should be correctly mapped and propagated to the SDK.
Screenshots
Desktop
OS: [Windows]
Language [C#]
Version [6.7.2]
Additional
I further recommend adjusting "Violencegraphic" to its UpperCamelCase version "ViolenceGraphic".
I further recommend replacing the float result types with either decimal or double, as of the already given double precision values originating from the openai-API.
Thank you! Keep up the good work.
The text was updated successfully, but these errors were encountered:
Thank you for bringing this to our attention. It appears to be a bug in the OpenAI.SDK/ObjectModels/ResponseModels/CreateModerationResponse.cs file where the special characters ("-", "/") are missing from the JsonPropertyNames for the "self-harm", "sexual/minors", "hate/threatening", and "violence/graphic" properties.
To fix this issue, you can manually edit the CreateModerationResponse.cs file to add the missing special characters to the JsonPropertyNames. For example:
`[JsonPropertyName("self-harm")]
public float SelfHarm { get; set; }
[JsonPropertyName("sexual/minors")]
public float SexualMinors { get; set; }
[JsonPropertyName("hate/threatening")]
public float HateThreatening { get; set; }
[JsonPropertyName("violence/graphic")]
public float ViolenceGraphic { get; set; }
`
Alternatively, you can wait for a patch or update from OpenAI that addresses this issue.
In the meantime, you may want to implement additional checks and validations in your code to ensure that the correct properties and values are being used for moderation responses.
Describe the bug
The corresponding JsonPropertyNames "self-harm", "sexual/minors", "hate/threatening" and "violence/graphic" within CreateModerationResponse.cs are mapped incorrectly. All eight occurrences within the file are missing their special characters ("-", "/"). This prevents SDK clients from correct decision making based on community guidelines and general terms and services when relying on moderation responses.
Result
Moderation requests with immanent violations currently result in incorrect scores and categories on four out of seven possible properties. The corresponding values either always return "false" or "0.0".
Expected behavior
The received moderation values from the openai-API should be correctly mapped and propagated to the SDK.
Screenshots
Desktop
Additional
I further recommend adjusting "Violencegraphic" to its UpperCamelCase version "ViolenceGraphic".
I further recommend replacing the float result types with either decimal or double, as of the already given double precision values originating from the openai-API.
Thank you! Keep up the good work.
The text was updated successfully, but these errors were encountered: