Class FunctionCallingOptionsBuilder.PortableFunctionCallingOptions
java.lang.Object
org.springframework.ai.model.function.FunctionCallingOptionsBuilder.PortableFunctionCallingOptions
- All Implemented Interfaces:
ChatOptions,FunctionCallingOptions,ModelOptions
- Enclosing class:
- FunctionCallingOptionsBuilder
public static class FunctionCallingOptionsBuilder.PortableFunctionCallingOptions
extends Object
implements FunctionCallingOptions, ChatOptions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()copy()Function Callbacks to be registered with the ChatModel.getModel()getTopK()getTopP()voidsetFrequencyPenalty(Double frequencyPenalty) voidsetFunctionCallbacks(List<FunctionCallback> functionCallbacks) Set the Function Callbacks to be registered with the ChatModel.voidsetFunctions(Set<String> functions) Set the list of function names from the ChatModel registry to be used in the next chat completion requests.voidsetMaxTokens(Integer maxTokens) voidvoidsetPresencePenalty(Double presencePenalty) voidsetProxyToolCalls(Boolean proxyToolCalls) voidsetStopSequences(List<String> stopSequences) voidsetTemperature(Double temperature) voidsetToolContext(Map<String, Object> context) voidvoid
-
Constructor Details
-
PortableFunctionCallingOptions
public PortableFunctionCallingOptions()
-
-
Method Details
-
builder
- Returns:
- Returns FunctionCallingOptionsBuilder to create a new instance of FunctionCallingOptions.
-
getFunctionCallbacks
Description copied from interface:FunctionCallingOptionsFunction Callbacks to be registered with the ChatModel. For Prompt Options the functionCallbacks are automatically enabled for the duration of the prompt execution. For Default Options the FunctionCallbacks are registered but disabled by default. You have to use "functions" property to list the function names from the ChatModel registry to be used in the chat completion requests.- Specified by:
getFunctionCallbacksin interfaceFunctionCallingOptions- Returns:
- Return the Function Callbacks to be registered with the ChatModel.
-
setFunctionCallbacks
Description copied from interface:FunctionCallingOptionsSet the Function Callbacks to be registered with the ChatModel.- Specified by:
setFunctionCallbacksin interfaceFunctionCallingOptions- Parameters:
functionCallbacks- the Function Callbacks to be registered with the ChatModel.
-
getFunctions
- Specified by:
getFunctionsin interfaceFunctionCallingOptions- Returns:
- List of function names from the ChatModel registry to be used in the next chat completion requests.
-
setFunctions
Description copied from interface:FunctionCallingOptionsSet the list of function names from the ChatModel registry to be used in the next chat completion requests.- Specified by:
setFunctionsin interfaceFunctionCallingOptions- Parameters:
functions- the list of function names from the ChatModel registry to be used in the next chat completion requests.
-
getModel
- Specified by:
getModelin interfaceChatOptions
-
setModel
-
getFrequencyPenalty
- Specified by:
getFrequencyPenaltyin interfaceChatOptions
-
setFrequencyPenalty
-
getMaxTokens
- Specified by:
getMaxTokensin interfaceChatOptions
-
setMaxTokens
-
getPresencePenalty
- Specified by:
getPresencePenaltyin interfaceChatOptions
-
setPresencePenalty
-
getStopSequences
- Specified by:
getStopSequencesin interfaceChatOptions
-
setStopSequences
-
getTemperature
- Specified by:
getTemperaturein interfaceChatOptions
-
setTemperature
-
getTopK
- Specified by:
getTopKin interfaceChatOptions
-
setTopK
-
getTopP
- Specified by:
getTopPin interfaceChatOptions
-
setTopP
-
getProxyToolCalls
- Specified by:
getProxyToolCallsin interfaceFunctionCallingOptions
-
setProxyToolCalls
- Specified by:
setProxyToolCallsin interfaceFunctionCallingOptions
-
getToolContext
- Specified by:
getToolContextin interfaceFunctionCallingOptions
-
setToolContext
- Specified by:
setToolContextin interfaceFunctionCallingOptions
-
copy
- Specified by:
copyin interfaceChatOptions
-