AI rule node: correct method name for schema adapter
This commit is contained in:
parent
030f8ce974
commit
cdb7e3b0c0
@ -46,7 +46,7 @@ final class Langchain4jJsonSchemaAdapter {
|
||||
* @param rootSchemaNode a valid JSON Schema as a Jackson {@link ObjectNode}
|
||||
* @return the corresponding Langchain4j {@link JsonSchema}
|
||||
*/
|
||||
public static JsonSchema fromJsonNode(ObjectNode rootSchemaNode) {
|
||||
public static JsonSchema fromObjectNode(ObjectNode rootSchemaNode) {
|
||||
return JsonSchema.builder()
|
||||
.name(rootSchemaNode.get("title").textValue())
|
||||
.rootElement(parse(rootSchemaNode))
|
||||
|
||||
@ -84,7 +84,7 @@ public final class TbAiNode extends TbAbstractExternalNode implements TbNode {
|
||||
if (config.getResponseFormatType() == ResponseFormatType.JSON) {
|
||||
responseFormat = ResponseFormat.builder()
|
||||
.type(config.getResponseFormatType())
|
||||
.jsonSchema(config.getJsonSchema() != null ? Langchain4jJsonSchemaAdapter.fromJsonNode(config.getJsonSchema()) : null)
|
||||
.jsonSchema(config.getJsonSchema() != null ? Langchain4jJsonSchemaAdapter.fromObjectNode(config.getJsonSchema()) : null)
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user