- Issue created by @jibla
- Status changed to Active
9 months ago 2:57pm 6 August 2024 - Assigned to vasike
- Status changed to Needs work
3 months ago 9:45am 5 February 2025 - Merge request !8Issue #3466338: Add safety settings support for Chat requests from Provider settings. β (Open) created by vasike
- π·π΄Romania vasike Ramnicu Valcea
Created a Draft MR for this ... trying to cover issue description ... as I could imagined.
However not sure about:
- Not All Combination of Category - Thresholds works ... and from documentation is not clear if there is a mapping or some rules
Also if they different per Model in Use.
As results - a lot of "combinations" tried throws errors ...- If those safety settings should be at the Provider level ... or they should be at the "usage" level ... where actually the "request" are built/"prepared".
- Maybe, also the PHP client library should provide more on this "subject".
I'll set on Needs Review - temporarily - just ot gain some attention and find a plan for this - at least.
- π©πͺGermany a.dmitriiev
a.dmitriiev β made their first commit to this issueβs fork.
- π©πͺGermany a.dmitriiev
I have also added moderation operation type support to the provider. There is still some work needed. For some reason the request with safety settings fail with the error:
* GenerateContentRequest.safety_settings[0]: element predicate failed: $.category in (HarmCategory.HARM_CATEGORY_HATE_SPEECH, HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT, HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT, HarmCategory.HARM_CATEGORY_HARASSMENT, HarmCategory.HARM_CATEGORY_CIVIC_INTEGRITY)
* GenerateContentRequest.safety_settings[1]: element predicate failed: $.category in (HarmCategory.HARM_CATEGORY_HATE_SPEECH, HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT, HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT, HarmCategory.HARM_CATEGORY_HARASSMENT, HarmCategory.HARM_CATEGORY_CIVIC_INTEGRITY)
* GenerateContentRequest.safety_settings[2]: element predicate failed: $.category in (HarmCategory.HARM_CATEGORY_HATE_SPEECH, HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT, HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT, HarmCategory.HARM_CATEGORY_HARASSMENT, HarmCategory.HARM_CATEGORY_CIVIC_INTEGRITY)
* GenerateContentRequest.safety_settings[3]: element predicate failed: $.category in (HarmCategory.HARM_CATEGORY_HATE_SPEECH, HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT, HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT, HarmCategory.HARM_CATEGORY_HARASSMENT, HarmCategory.HARM_CATEGORY_CIVIC_INTEGRITY)
* GenerateContentRequest.safety_settings[4]: element predicate failed: $.category in (HarmCategory.HARM_CATEGORY_HATE_SPEECH, HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT, HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT, HarmCategory.HARM_CATEGORY_HARASSMENT, HarmCategory.HARM_CATEGORY_CIVIC_INTEGRITY)
* GenerateContentRequest.safety_settings[5]: element predicate failed: $.category in (HarmCategory.HARM_CATEGORY_HATE_SPEECH, HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT, HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT, HarmCategory.HARM_CATEGORY_HARASSMENT, HarmCategory.HARM_CATEGORY_CIVIC_INTEGRITY)
* GenerateContentRequest.safety_settings[6]: element predicate failed: $.category in (HarmCategory.HARM_CATEGORY_HATE_SPEECH, HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT, HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT, HarmCategory.HARM_CATEGORY_HARASSMENT, HarmCategory.HARM_CATEGORY_CIVIC_INTEGRITY) - π·π΄Romania vasike Ramnicu Valcea
Fix MR conflicts and PHP CS ...
also put some comment on moderation code there ... It seems it tries to uses OpenAI provider "code".
- π©πͺGermany a.dmitriiev
I have removed the moderation operation support to unblock this issue as it was a bit out of scope and not ready.