Class FunctionDeclarationMaker (1.38.0)
Stay organized with collections
Save and categorize content based on your preferences.
publicfinalclass FunctionDeclarationMakerDeprecated. This class and its package are deprecated. See the migration guide for more details.
Helper class to create com.google.cloud.vertexai.api.FunctionDeclaration
Inherited Members
Static Methods
fromFunc(String functionDescription, Method function, String[] orderedParameterNames) (deprecated)
publicstaticFunctionDeclarationfromFunc(StringfunctionDescription,Methodfunction,String[]orderedParameterNames)Creates a FunctionDeclaration from a Java static method
Note:: If you don't want to manually provide parameter names, you can ignore
orderedParameterNames and compile your code with the "-parameters" flag. In this case, the
parameter names can be auto retrieved from reflection.
| Parameters | |
|---|---|
| Name | Description |
functionDescription |
String A description of the method. |
function |
Method A Java static method. |
orderedParameterNames |
String[]A list of parameter names in the order they are passed to the method. |
| Returns | |
|---|---|
| Type | Description |
FunctionDeclaration |
a com.google.cloud.vertexai.api.FunctionDeclaration instance. |
fromJsonObject(JsonObject jsonObject) (deprecated)
publicstaticFunctionDeclarationfromJsonObject(JsonObjectjsonObject)Creates a FunctionDeclaration from a JsonObject
| Parameter | |
|---|---|
| Name | Description |
jsonObject |
com.google.gson.JsonObjectA valid Json Object that can be parsed to a FunctionDeclaration. |
| Returns | |
|---|---|
| Type | Description |
FunctionDeclaration |
a FunctionDeclaration by parsing the input json Object. |
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
if the jsonObject can't be parsed into a FunctionDeclaration proto. |
fromJsonString(String jsonString) (deprecated)
publicstaticFunctionDeclarationfromJsonString(StringjsonString)Creates a FunctionDeclaration from a JsonString
| Parameter | |
|---|---|
| Name | Description |
jsonString |
String A valid Json String that can be parsed to a FunctionDeclaration. |
| Returns | |
|---|---|
| Type | Description |
FunctionDeclaration |
a FunctionDeclaration by parsing the input json String. |
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
if the String can't be parsed into a FunctionDeclaration proto. |
Constructors
FunctionDeclarationMaker() (deprecated)
publicFunctionDeclarationMaker()