Class ChatCompletionTool
-
- All Implemented Interfaces:
public final class ChatCompletionTool
A function tool that can be used to generate a response.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
ChatCompletionTool.Visitor
An interface that defines how to map each variant of ChatCompletionTool to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<ChatCompletionFunctionTool>
function()
A function tool that can be used to generate a response. final Optional<ChatCompletionCustomTool>
custom()
A custom tool that processes input using a specified format. final Boolean
isFunction()
final Boolean
isCustom()
final ChatCompletionFunctionTool
asFunction()
A function tool that can be used to generate a response. final ChatCompletionCustomTool
asCustom()
A custom tool that processes input using a specified format. final Optional<JsonValue>
_json()
final <T extends Any> T
accept(ChatCompletionTool.Visitor<T> visitor)
final ChatCompletionTool
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ChatCompletionTool
ofFunction(ChatCompletionFunctionTool function)
A function tool that can be used to generate a response. final static ChatCompletionTool
ofCustom(ChatCompletionCustomTool custom)
A custom tool that processes input using a specified format. -
-
Method Detail
-
function
final Optional<ChatCompletionFunctionTool> function()
A function tool that can be used to generate a response.
-
custom
final Optional<ChatCompletionCustomTool> custom()
A custom tool that processes input using a specified format.
-
isFunction
final Boolean isFunction()
-
asFunction
final ChatCompletionFunctionTool asFunction()
A function tool that can be used to generate a response.
-
asCustom
final ChatCompletionCustomTool asCustom()
A custom tool that processes input using a specified format.
-
accept
final <T extends Any> T accept(ChatCompletionTool.Visitor<T> visitor)
-
validate
final ChatCompletionTool validate()
-
ofFunction
final static ChatCompletionTool ofFunction(ChatCompletionFunctionTool function)
A function tool that can be used to generate a response.
-
ofCustom
final static ChatCompletionTool ofCustom(ChatCompletionCustomTool custom)
A custom tool that processes input using a specified format.
-
-
-
-