Class ChatCompletionFunctionTool
-
- All Implemented Interfaces:
public final class ChatCompletionFunctionTool
A function tool that can be used to generate a response.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
ChatCompletionFunctionTool.Builder
A builder for ChatCompletionFunctionTool.
-
Method Summary
Modifier and Type Method Description final FunctionDefinition
function()
final JsonValue
_type()
The type of the tool. final JsonField<FunctionDefinition>
_function()
Returns the raw JSON value of function. final Map<String, JsonValue>
_additionalProperties()
final ChatCompletionFunctionTool.Builder
toBuilder()
final ChatCompletionFunctionTool
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ChatCompletionFunctionTool.Builder
builder()
Returns a mutable builder for constructing an instance of ChatCompletionFunctionTool. -
-
Method Detail
-
function
final FunctionDefinition function()
-
_type
final JsonValue _type()
The type of the tool. Currently, only
function
is supported.Expected to always return the following:
JsonValue.from("function")
However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_function
final JsonField<FunctionDefinition> _function()
Returns the raw JSON value of function.
Unlike function, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ChatCompletionFunctionTool.Builder toBuilder()
-
validate
final ChatCompletionFunctionTool validate()
-
builder
final static ChatCompletionFunctionTool.Builder builder()
Returns a mutable builder for constructing an instance of ChatCompletionFunctionTool.
The following fields are required:
.function()
-
-
-
-