Skip to content

Wrong JsonPropertyNames in OpenAI.SDK/ObjectModels/ResponseModels/CreateModerationResponse.cs  #214

Closed
@scolmarg

Description

@scolmarg

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
image
image
image

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions