Package dev.langchain4j.model.vertexai
Class SchemaHelper
java.lang.Object
dev.langchain4j.model.vertexai.SchemaHelper
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.cloud.vertexai.api.Schema
from
(JsonSchemaElement jsonSchemaElement) static com.google.cloud.vertexai.api.Schema
Create an instance ofSchema
from a class by reflection on its fields.static com.google.cloud.vertexai.api.Schema
fromJsonSchema
(String jsonSchemaString) Create an instance ofSchema
from a JSON schema string.
-
Constructor Details
-
SchemaHelper
public SchemaHelper()
-
-
Method Details
-
fromJsonSchema
Create an instance ofSchema
from a JSON schema string.- Parameters:
jsonSchemaString
- the JSON schema string- Returns:
- a fully built schema
-
fromClass
Create an instance ofSchema
from a class by reflection on its fields.- Parameters:
theClass
- the class for which to create a schema representation- Returns:
- a fully built schema
-
from
-