Interface ChatCompletionTool.Visitor
-
- All Implemented Interfaces:
public interface ChatCompletionTool.Visitor<T extends Object>
An interface that defines how to map each variant of ChatCompletionTool to a value of type T.
-
-
Method Summary
Modifier and Type Method Description abstract T
visitFunction(ChatCompletionFunctionTool function)
A function tool that can be used to generate a response. abstract T
visitCustom(ChatCompletionCustomTool custom)
A custom tool that processes input using a specified format. T
unknown(JsonValue json)
Maps an unknown variant of ChatCompletionTool to a value of type T. -
-
Method Detail
-
visitFunction
abstract T visitFunction(ChatCompletionFunctionTool function)
A function tool that can be used to generate a response.
-
visitCustom
abstract T visitCustom(ChatCompletionCustomTool custom)
A custom tool that processes input using a specified format.
-
unknown
T unknown(JsonValue json)
Maps an unknown variant of ChatCompletionTool to a value of type T.
An instance of ChatCompletionTool can contain an unknown variant if it was deserialized from data that doesn't match any known variant. For example, if the SDK is on an older version than the API, then the API may respond with new variants that the SDK is unaware of.
-
-
-
-