You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current OpenAI Kotlin client lacks the ability to deserialize the Content Filter response returned by the Azure OpenAI API (Content Filter Documentation). Additionally, the client does not expose the HTTP headers, body of the response, or a way to disable deserialization of the response. This makes it impossible to use the client to call the Azure OpenAI API when we want to use the Content Filter feature.
Problem it Solves
This feature request aims to address the inability to use the Content Filter feature of the Azure OpenAI API with the current OpenAI Kotlin client. Currently, there is no workaround for this issue, which limits the functionality and usability of the client. Developers are unable to filter content as per their requirements, which can be a crucial feature for many applications.
Proposed Solution
There are two potential solutions to this problem:
Add a content filter parameter as optional in the current Chat Completions and Completions response. For example:
@Serializable
publicdata classChatCompletion(
// all existing properties// .../** * Content filtering results for zero or more prompts in the request. In a streaming request, * results for different prompts may arrive at different times or in different orders.*/
@SerialName("prompt_filter_results")
valpromptFilterResults:List<ContentFilterResultsForPrompt>? = null
)
Expose the ability to get raw response from the client, so that we can deserialize the response ourselves. This would provide more flexibility and control over the response handling, and allow developers to handle the response as per their specific requirements.
Additional Context
The Azure OpenAI API provides a Content Filter feature that is currently unusable with the OpenAI Kotlin client due to the issues described above. Implementing either of the proposed solutions would greatly enhance the functionality and usability of the client, and allow developers to fully leverage the capabilities of the Azure OpenAI API. This would be a significant improvement for developers who need to use content filtering in their applications.
The text was updated successfully, but these errors were encountered:
Feature Description
The current OpenAI Kotlin client lacks the ability to deserialize the Content Filter response returned by the Azure OpenAI API (Content Filter Documentation). Additionally, the client does not expose the HTTP headers, body of the response, or a way to disable deserialization of the response. This makes it impossible to use the client to call the Azure OpenAI API when we want to use the Content Filter feature.
Problem it Solves
This feature request aims to address the inability to use the Content Filter feature of the Azure OpenAI API with the current OpenAI Kotlin client. Currently, there is no workaround for this issue, which limits the functionality and usability of the client. Developers are unable to filter content as per their requirements, which can be a crucial feature for many applications.
Proposed Solution
There are two potential solutions to this problem:
Additional Context
The Azure OpenAI API provides a Content Filter feature that is currently unusable with the OpenAI Kotlin client due to the issues described above. Implementing either of the proposed solutions would greatly enhance the functionality and usability of the client, and allow developers to fully leverage the capabilities of the Azure OpenAI API. This would be a significant improvement for developers who need to use content filtering in their applications.
The text was updated successfully, but these errors were encountered: