spring-ai
spring-ai copied to clipboard
Reevaluate class name BeanOutputConverter
BeanOutputConverter
works fine with records too:
record Profile( String nickname, int hornlength ) {}
var outputParser = new BeanOutputConverter<>( Profile.class );
System.out.println( outputParser.getFormat() );
->
Your response should be in JSON format.
Do not include any explanations, only provide a RFC8259 compliant JSON response following this format without deviation.
Do not include markdown code blocks in your response.
Here is the JSON Schema instance your output must adhere to:
```{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"hornlength" : {
"type" : "integer"
},
"nickname" : {
"type" : "string"
}
}
}```
Maybe rename the class name.
This reminds me of class DataClassRowMapper
extends BeanPropertyRowMapper
.
There is a new class OutputParserConverter
@ullenboom have you checked the new Structured Output docs: https://docs.spring.io/spring-ai/reference/1.0-SNAPSHOT/api/structured-output-converter.html
I've updated my issue. The naming concern also applies to BeanOutputConverter
.
Has been addressed, now using OutputConverter
style suffix