Skip to content

Conversation

@juliomartinsdev
Copy link
Contributor

@juliomartinsdev juliomartinsdev commented Sep 26, 2024

Adding field for prompt_filter_results which is in the open content filters to assess the content of the user input. Current implementation in go-openai will only return content filter information on the model output using ChatCompletionResponse. This is for AzureOpenAI spec.

Adding field for content_filter_results which is in the open content filters to assess the content of the user input. Current implementation in go-openai will only return content filter information on the model output using ChatCompletionChoice. This is for AzureOpenAI spec.

Adding field for jailbreak which is in a content filter. Current implementation in go-openai will only return content filter information on the error output using InnerError.ContentFilterResults. This is for AzureOpenAI spec.

Provide OpenAI documentation link
Relevant API doc: https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/content-filter

Describe your solution
Change struct

@codecov
Copy link

codecov bot commented Sep 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.04%. Comparing base (774fc9d) to head (8033f54).
Report is 59 commits behind head on master.

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

@juliomartinsdev juliomartinsdev changed the title add jailbreak filter result add jailbreak filter result, add ContentFilterResults on output Sep 27, 2024
@juliomartinsdev
Copy link
Contributor Author

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

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 7c145eb into sashabaranov:master Oct 3, 2024
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