Class ChatCompletionTool
- 
                    
                    
- All Implemented Interfaces:
 
public final class ChatCompletionToolA function tool that can be used to generate a response.
 
- 
                
                    
                    
- 
                                
                            
                                
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceChatCompletionTool.VisitorAn 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 BooleanisFunction()final BooleanisCustom()final ChatCompletionFunctionToolasFunction()A function tool that can be used to generate a response. final ChatCompletionCustomToolasCustom()A custom tool that processes input using a specified format. final Optional<JsonValue>_json()final <T extends Any> Taccept(ChatCompletionTool.Visitor<T> visitor)final ChatCompletionToolvalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ChatCompletionToolofFunction(ChatCompletionFunctionTool function)A function tool that can be used to generate a response. final static ChatCompletionToolofCustom(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.
 
 - 
                                        
 
 - 
                                
                            
                                
 
 - 
                    
                    
                    
 
 -