All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.sashirestela.openai.support.JsonSchemaUtil Maven / Gradle / Ivy

There is a newer version: 3.9.2
Show newest version
package io.github.sashirestela.openai.support;

import com.fasterxml.jackson.databind.JsonNode;
import io.github.sashirestela.openai.common.function.SchemaConverter;

public class JsonSchemaUtil {

    public static final SchemaConverter defaultConverter = new DefaultSchemaConverter();

    public static final String JSON_EMPTY_CLASS = "{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}";

    private JsonSchemaUtil() {
    }

    public static JsonNode classToJsonSchema(Class clazz) {
        return defaultConverter.convert(clazz);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy