public class FunctionExecutor
extends java.lang.Object
| Constructor and Description |
|---|
FunctionExecutor(java.util.List<com.theokanning.openai.completion.chat.ChatFunction> functions) |
FunctionExecutor(java.util.List<com.theokanning.openai.completion.chat.ChatFunction> functions,
com.fasterxml.jackson.databind.ObjectMapper objectMapper) |
| Modifier and Type | Method and Description |
|---|---|
com.theokanning.openai.completion.chat.ChatMessage |
convertExceptionToMessage(java.lang.Exception exception) |
<T> T |
execute(com.theokanning.openai.completion.chat.ChatFunctionCall call) |
com.fasterxml.jackson.databind.JsonNode |
executeAndConvertToJson(com.theokanning.openai.completion.chat.ChatFunctionCall call) |
com.theokanning.openai.completion.chat.ChatMessage |
executeAndConvertToMessage(com.theokanning.openai.completion.chat.ChatFunctionCall call) |
com.theokanning.openai.completion.chat.ChatMessage |
executeAndConvertToMessageHandlingExceptions(com.theokanning.openai.completion.chat.ChatFunctionCall call) |
java.util.Optional<com.theokanning.openai.completion.chat.ChatMessage> |
executeAndConvertToMessageSafely(com.theokanning.openai.completion.chat.ChatFunctionCall call) |
java.util.List<com.theokanning.openai.completion.chat.ChatFunction> |
getFunctions() |
void |
setFunctions(java.util.List<com.theokanning.openai.completion.chat.ChatFunction> functions) |
void |
setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) |
public FunctionExecutor(java.util.List<com.theokanning.openai.completion.chat.ChatFunction> functions)
public FunctionExecutor(java.util.List<com.theokanning.openai.completion.chat.ChatFunction> functions,
com.fasterxml.jackson.databind.ObjectMapper objectMapper)
public java.util.Optional<com.theokanning.openai.completion.chat.ChatMessage> executeAndConvertToMessageSafely(com.theokanning.openai.completion.chat.ChatFunctionCall call)
public com.theokanning.openai.completion.chat.ChatMessage executeAndConvertToMessageHandlingExceptions(com.theokanning.openai.completion.chat.ChatFunctionCall call)
public com.theokanning.openai.completion.chat.ChatMessage convertExceptionToMessage(java.lang.Exception exception)
public com.theokanning.openai.completion.chat.ChatMessage executeAndConvertToMessage(com.theokanning.openai.completion.chat.ChatFunctionCall call)
public com.fasterxml.jackson.databind.JsonNode executeAndConvertToJson(com.theokanning.openai.completion.chat.ChatFunctionCall call)
public <T> T execute(com.theokanning.openai.completion.chat.ChatFunctionCall call)
public java.util.List<com.theokanning.openai.completion.chat.ChatFunction> getFunctions()
public void setFunctions(java.util.List<com.theokanning.openai.completion.chat.ChatFunction> functions)
public void setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)