Skip to content

Conversation

@ShivangiReja
Copy link
Collaborator

Summary of Changes

This PR renames the following types and properties for consistency and clarity:

  • Types:

    • OpenAIFileInfoOpenAIFile
    • OpenAIFileInfoCollectionOpenAIFileCollection
    • OpenAIModelInfoOpenAIModel
    • OpenAIModelInfoCollectionOpenAIModelCollection
    • EmbeddingOpenAIEmbedding
    • EmbeddingCollectionOpenAIEmbeddingCollection
  • Properties and Methods:

    • ImageUrlImageUri and method FromImageUrlFromImageUri in MessageContent
    • ParallelToolCallsEnabledAllowParallelToolCalls in RunCreationOptions, ThreadRun, and ChatCompletionOptions
    • PromptTokensInputTokenCount, CompletionTokensOutputTokenCount, and TotalTokensTotalTokenCount in RunTokenUsage
    • InputTokensInputTokenCount and TotalTokensTotalTokenCount in EmbeddingTokenUsage

This PR also refactors the ModerationResult type to consolidate category-specific flags and scores into individual ModerationCategory properties, each containing Flagged and Score properties:

public class ModerationResult {
    public bool Flagged { get; }
    public ModerationCategory Harassment { get; }
    public ModerationCategory HarassmentThreatening { get; }
    public ModerationCategory Hate { get; }
    public ModerationCategory HateThreatening { get; }
    public ModerationCategory SelfHarm { get; }
    public ModerationCategory SelfHarmInstructions { get; }
    public ModerationCategory SelfHarmIntent { get; }
    public ModerationCategory Sexual { get; }
    public ModerationCategory SexualMinors { get; }
    public ModerationCategory Violence { get; }
    public ModerationCategory ViolenceGraphic { get; }
}

public class ModerationCategory {
    public bool Flagged { get; }
    public float Score { get; }
}

Additionally, this PR includes smoke tests for the ModerationResult type.

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