Class SchemaHelper

java.lang.Object
dev.langchain4j.model.vertexai.SchemaHelper

public class SchemaHelper extends Object
Helper class to create a com.google.cloud.vertexai.api.Schema from a JSON schema string, or from a class by reflection on its public fields.
  • Constructor Details

    • SchemaHelper

      public SchemaHelper()
  • Method Details

    • fromJsonSchema

      public static com.google.cloud.vertexai.api.Schema fromJsonSchema(String jsonSchemaString)
      Create an instance of Schema from a JSON schema string.
      Parameters:
      jsonSchemaString - the JSON schema string
      Returns:
      a fully built schema
    • fromClass

      public static com.google.cloud.vertexai.api.Schema fromClass(Class<?> theClass)
      Create an instance of Schema from a class by reflection on its fields.
      Parameters:
      theClass - the class for which to create a schema representation
      Returns:
      a fully built schema