Class GPTFunctionDetails
- java.lang.Object
-
- com.composum.ai.backend.base.service.chat.GPTFunctionDetails
-
public class GPTFunctionDetails extends Object
Represents the details of a function used as a tool in the chat completion request. Includes the function's name, description, parameters, and an optional strict flag.
-
-
Constructor Summary
Constructors Constructor Description GPTFunctionDetails(String name, String description, Object parameters, Boolean strict)
Creates the object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDescription()
A brief description of what the function does.String
getName()
The name of the function to be called.Object
getParameters()
The parameters accepted by the function, defined as an arbitrary JSON schema object.Boolean
getStrict()
Whether to enforce strict schema adherence for the parameters.
-
-
-
Constructor Detail
-
GPTFunctionDetails
public GPTFunctionDetails(String name, String description, Object parameters, Boolean strict)
Creates the object- Parameters:
name
- The name of the function to be called. This must be unique and can only contain a-z, A-Z, 0-9, underscores, and dashes.description
- A brief description of what the function does. Helps the model choose when to call it. The parameters accepted by the function, defined as an arbitrary JSON schema object.parameters
- The parameters accepted by the function, defined as an arbitrary JSON schema object.strict
- Whether to enforce strict schema adherence for the parameters
-
-
Method Detail
-
getName
public String getName()
The name of the function to be called. This must be unique and can only contain a-z, A-Z, 0-9, underscores, and dashes.
-
getDescription
public String getDescription()
A brief description of what the function does. Helps the model choose when to call it.
-
getParameters
public Object getParameters()
The parameters accepted by the function, defined as an arbitrary JSON schema object.
-
getStrict
public Boolean getStrict()
Whether to enforce strict schema adherence for the parameters.
-
-