Interface FunctionCallingOptions.Builder
- All Superinterfaces:
ChatOptions.Builder
- All Known Implementing Classes:
DefaultFunctionCallingOptionsBuilder
- Enclosing interface:
- FunctionCallingOptions
Builder for creating
FunctionCallingOptions
instance.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds theFunctionCallingOptions
.frequencyPenalty
(Double frequencyPenalty) Builds with the frequency penalty to use for the chat.The function name to be registered with the chat model.functionCallbacks
(List<FunctionCallback> functionCallbacks) The list of Function Callbacks to be registered with the Chat model.functionCallbacks
(FunctionCallback... functionCallbacks) The Function Callbacks to be registered with the Chat model.Set
of function names to be registered with the Chat model.Builds with the maximum number of tokens to use for the chat.Builds with the model to use for the chat.presencePenalty
(Double presencePenalty) Builds with the presence penalty to use for the chat.proxyToolCalls
(Boolean proxyToolCalls) Boolean flag to indicate if the proxy ToolCalls is enabled.stopSequences
(List<String> stopSequences) Builds with the stop sequences to use for the chat.temperature
(Double temperature) Builds with the temperature to use for the chat.toolContext
(String key, Object value) Add a specific key/value pair to the tool context.toolContext
(Map<String, Object> context) Add aMap
of context values into tool context.Builds with the top K to use for the chat.Builds with the top P to use for the chat.default FunctionCallingOptions.Builder
withFrequencyPenalty
(Double frequencyPenalty) Deprecated, for removal: This API element is subject to removal in a future version.default FunctionCallingOptions.Builder
withFunction
(String function) Deprecated, for removal: This API element is subject to removal in a future version.Usefunction(String)
instead.default FunctionCallingOptions.Builder
withFunctionCallbacks
(List<FunctionCallback> functionCallbacks) Deprecated, for removal: This API element is subject to removal in a future version.UsefunctionCallbacks(List)
instead.default FunctionCallingOptions.Builder
withFunctionCallbacks
(FunctionCallback... functionCallbacks) Deprecated, for removal: This API element is subject to removal in a future version.UsefunctionCallbacks(FunctionCallback...)
instead.default FunctionCallingOptions.Builder
withFunctions
(Set<String> functions) Deprecated, for removal: This API element is subject to removal in a future version.Usefunctions(Set)
instead.default FunctionCallingOptions.Builder
withMaxTokens
(Integer maxTokens) Deprecated, for removal: This API element is subject to removal in a future version.UsemaxTokens(Integer)
instead.default FunctionCallingOptions.Builder
Deprecated, for removal: This API element is subject to removal in a future version.Usemodel(String)
instead.default FunctionCallingOptions.Builder
withPresencePenalty
(Double presencePenalty) Deprecated, for removal: This API element is subject to removal in a future version.UsepresencePenalty(Double)
instead.default FunctionCallingOptions.Builder
withStopSequences
(List<String> stopSequences) Deprecated, for removal: This API element is subject to removal in a future version.UsestopSequences(List)
instead.default FunctionCallingOptions.Builder
withTemperature
(Double temperature) Deprecated, for removal: This API element is subject to removal in a future version.Usetemperature(Double)
instead.
-
Method Details
-
functionCallbacks
The list of Function Callbacks to be registered with the Chat model.- Parameters:
functionCallbacks
- the list of Function Callbacks.- Returns:
- the FunctionCallOptions Builder.
-
functionCallbacks
The Function Callbacks to be registered with the Chat model.- Parameters:
functionCallbacks
- the function callbacks.- Returns:
- the FunctionCallOptions Builder.
-
functions
Set
of function names to be registered with the Chat model.- Parameters:
functions
- theSet
of function names- Returns:
- the FunctionCallOptions Builder.
-
function
The function name to be registered with the chat model.- Parameters:
function
- the name of the function.- Returns:
- the FunctionCallOptions Builder.
-
proxyToolCalls
Boolean flag to indicate if the proxy ToolCalls is enabled.- Parameters:
proxyToolCalls
- boolean value to enable proxy ToolCalls.- Returns:
- the FunctionCallOptions Builder.
-
toolContext
Add aMap
of context values into tool context.- Parameters:
context
- the map representing the tool context.- Returns:
- the FunctionCallOptions Builder.
-
toolContext
Add a specific key/value pair to the tool context.- Parameters:
key
- the key to use.value
- the corresponding value.- Returns:
- the FunctionCallOptions Builder.
-
build
FunctionCallingOptions build()Builds theFunctionCallingOptions
.- Specified by:
build
in interfaceChatOptions.Builder
- Returns:
- the FunctionCalling options.
-
model
Description copied from interface:ChatOptions.Builder
Builds with the model to use for the chat.- Specified by:
model
in interfaceChatOptions.Builder
- Returns:
- the builder
-
frequencyPenalty
Description copied from interface:ChatOptions.Builder
Builds with the frequency penalty to use for the chat.- Specified by:
frequencyPenalty
in interfaceChatOptions.Builder
- Returns:
- the builder.
-
maxTokens
Description copied from interface:ChatOptions.Builder
Builds with the maximum number of tokens to use for the chat.- Specified by:
maxTokens
in interfaceChatOptions.Builder
- Returns:
- the builder.
-
presencePenalty
Description copied from interface:ChatOptions.Builder
Builds with the presence penalty to use for the chat.- Specified by:
presencePenalty
in interfaceChatOptions.Builder
- Returns:
- the builder.
-
stopSequences
Description copied from interface:ChatOptions.Builder
Builds with the stop sequences to use for the chat.- Specified by:
stopSequences
in interfaceChatOptions.Builder
- Returns:
- the builder.
-
temperature
Description copied from interface:ChatOptions.Builder
Builds with the temperature to use for the chat.- Specified by:
temperature
in interfaceChatOptions.Builder
- Returns:
- the builder.
-
topK
Description copied from interface:ChatOptions.Builder
Builds with the top K to use for the chat.- Specified by:
topK
in interfaceChatOptions.Builder
- Returns:
- the builder.
-
topP
Description copied from interface:ChatOptions.Builder
Builds with the top P to use for the chat.- Specified by:
topP
in interfaceChatOptions.Builder
- Returns:
- the builder.
-
withModel
@Deprecated(forRemoval=true, since="1.0.0-M5") default FunctionCallingOptions.Builder withModel(String model) Deprecated, for removal: This API element is subject to removal in a future version.Usemodel(String)
instead. -
withFrequencyPenalty
@Deprecated(forRemoval=true, since="1.0.0-M5") default FunctionCallingOptions.Builder withFrequencyPenalty(Double frequencyPenalty) Deprecated, for removal: This API element is subject to removal in a future version.UsefrequencyPenalty(Double)
instead. -
withMaxTokens
@Deprecated(forRemoval=true, since="1.0.0-M5") default FunctionCallingOptions.Builder withMaxTokens(Integer maxTokens) Deprecated, for removal: This API element is subject to removal in a future version.UsemaxTokens(Integer)
instead. -
withPresencePenalty
@Deprecated(forRemoval=true, since="1.0.0-M5") default FunctionCallingOptions.Builder withPresencePenalty(Double presencePenalty) Deprecated, for removal: This API element is subject to removal in a future version.UsepresencePenalty(Double)
instead. -
withStopSequences
@Deprecated(forRemoval=true, since="1.0.0-M5") default FunctionCallingOptions.Builder withStopSequences(List<String> stopSequences) Deprecated, for removal: This API element is subject to removal in a future version.UsestopSequences(List)
instead. -
withTemperature
@Deprecated(forRemoval=true, since="1.0.0-M5") default FunctionCallingOptions.Builder withTemperature(Double temperature) Deprecated, for removal: This API element is subject to removal in a future version.Usetemperature(Double)
instead. -
withFunctionCallbacks
@Deprecated(forRemoval=true, since="1.0.0-M5") default FunctionCallingOptions.Builder withFunctionCallbacks(List<FunctionCallback> functionCallbacks) Deprecated, for removal: This API element is subject to removal in a future version.UsefunctionCallbacks(List)
instead. -
withFunctionCallbacks
@Deprecated(forRemoval=true, since="1.0.0-M5") default FunctionCallingOptions.Builder withFunctionCallbacks(FunctionCallback... functionCallbacks) Deprecated, for removal: This API element is subject to removal in a future version.UsefunctionCallbacks(FunctionCallback...)
instead. -
withFunctions
@Deprecated(forRemoval=true, since="1.0.0-M5") default FunctionCallingOptions.Builder withFunctions(Set<String> functions) Deprecated, for removal: This API element is subject to removal in a future version.Usefunctions(Set)
instead. -
withFunction
@Deprecated(forRemoval=true, since="1.0.0-M5") default FunctionCallingOptions.Builder withFunction(String function) Deprecated, for removal: This API element is subject to removal in a future version.Usefunction(String)
instead.
-
frequencyPenalty(Double)
instead.