-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
Description
Currently, the BeanOutputConverter StructuredOutput in the OpenAI Client passes JSON schema information through the prompt.
I think it would be more useful to pass the JSON schema information via the responseFormat option.
It would be helpful if responseFormat could be passed in LlmOptions and OpenAiChatOptionsConverter.
- spring ai blog: https://spring.io/blog/2024/08/09/spring-ai-embraces-openais-structured-outputs-enhancing-json-response
- spring ai OpenAiChatOptions: https://github.com/spring-projects/spring-ai/blob/f5e83491efd7eaaee98057a0e9619cf25def1e44/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiChatOptions.java#L153