ai-for-java / openai4j

Java client library for OpenAI API
Apache License 2.0
85 stars 35 forks source link

[singularity-sg] Add json_schema as an option for response_format #40

Closed singularity-sg closed 1 month ago

singularity-sg commented 2 months ago

Description

The OpenAI Chat Completion API now allows the type json_schema as part of the Structured Output feature (article) . This PR wants to include the capabilities to include this feature by adding a new json_schema argument to the ResponseFormat object. This allows the addition of the schema to be sent as part of the Chat Completion API request

langchain4j commented 2 months ago

Hi @singularity-sg, it has been implemented in https://github.com/ai-for-java/openai4j/commit/2fa57e9fa2c1457522d72072d9b7d1fd46826a0c

singularity-sg commented 1 month ago

This has been implemented so I'm closing it!