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}
|
* @param rootSchemaNode a valid JSON Schema as a Jackson {@link ObjectNode}
|
||||||
* @return the corresponding Langchain4j {@link JsonSchema}
|
* @return the corresponding Langchain4j {@link JsonSchema}
|
||||||
*/
|
*/
|
||||||
public static JsonSchema fromJsonNode(ObjectNode rootSchemaNode) {
|
public static JsonSchema fromObjectNode(ObjectNode rootSchemaNode) {
|
||||||
return JsonSchema.builder()
|
return JsonSchema.builder()
|
||||||
.name(rootSchemaNode.get("title").textValue())
|
.name(rootSchemaNode.get("title").textValue())
|
||||||
.rootElement(parse(rootSchemaNode))
|
.rootElement(parse(rootSchemaNode))
|
||||||
|
|||||||
@ -84,7 +84,7 @@ public final class TbAiNode extends TbAbstractExternalNode implements TbNode {
|
|||||||
if (config.getResponseFormatType() == ResponseFormatType.JSON) {
|
if (config.getResponseFormatType() == ResponseFormatType.JSON) {
|
||||||
responseFormat = ResponseFormat.builder()
|
responseFormat = ResponseFormat.builder()
|
||||||
.type(config.getResponseFormatType())
|
.type(config.getResponseFormatType())
|
||||||
.jsonSchema(config.getJsonSchema() != null ? Langchain4jJsonSchemaAdapter.fromJsonNode(config.getJsonSchema()) : null)
|
.jsonSchema(config.getJsonSchema() != null ? Langchain4jJsonSchemaAdapter.fromObjectNode(config.getJsonSchema()) : null)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user