-
Notifications
You must be signed in to change notification settings - Fork 300
Description
Hello,
we currently use async-openai
to query Azure OpenAI and we would need support for the new content filters on Azure OpenAI. Basically it's a new content_filter_results
field in (Chat)Choice
.
I would be happy to work on it, however I read the Contributing
section of the README 😄 and I understand you want to stick to OpenAI specs, while this is an Azure extension. But also (thankfully for us) there are already some Azure specific stuff I reckon (e.g. the AzureConfig), although limited admittedly.
What would be the best course of action? I see a few options:
- add the support, but make this field optional (it is anyway since you can choose to not enable those filters) so it doesn't break on pure OpenAI
- add the support and add an
azure
feature to the crate and gate Azure-specific stuff behind it - add some sort of "extra fields" to
(Chat)Choice
where anything extra would be stored as aserde_value::Map
(and then people "do their thing" with those extra fields) so it supports "extra features" from providers without being Azure-specific - I can also just fork (a friendly fork! or even just an internal one)
1
would work for me of course, but I think 2
(my preference) would be interesting, to have both pure OpenAI as default, but also support Azure extensions, since I believe Azure is actually a big de facto OpenAI provider, but I understand if you're not interested / willing to. 3
sounds quite hackish. 4
is OK of course as last resort. What do you think?