Class VertexAiGeminiChatOptions
java.lang.Object
org.springframework.ai.vertexai.gemini.VertexAiGeminiChatOptions
- All Implemented Interfaces:
ChatOptions
,FunctionCallingOptions
,ModelOptions
public class VertexAiGeminiChatOptions
extends Object
implements FunctionCallingOptions, ChatOptions
- Since:
- 1.0.0
- Author:
- Christian Tzolov, Thomas Vitale, Grogdunn
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static enum
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
copy()
boolean
static VertexAiGeminiChatOptions
fromOptions
(VertexAiGeminiChatOptions fromOptions) Function Callbacks to be registered with the ChatModel.boolean
getModel()
getTopK()
getTopP()
int
hashCode()
void
setCandidateCount
(Integer candidateCount) void
setFunctionCallbacks
(List<FunctionCallback> functionCallbacks) Set the Function Callbacks to be registered with the ChatModel.void
setFunctions
(Set<String> functions) Set the list of function names from the ChatModel registry to be used in the next chat completion requests.void
setGoogleSearchRetrieval
(boolean googleSearchRetrieval) void
setMaxOutputTokens
(Integer maxOutputTokens) void
setMaxTokens
(Integer maxTokens) void
void
setProxyToolCalls
(Boolean proxyToolCalls) setResponseMimeType
(String mimeType) void
setStopSequences
(List<String> stopSequences) void
setTemperature
(Double temperature) void
setToolContext
(Map<String, Object> toolContext) void
void
void
toString()
-
Constructor Details
-
VertexAiGeminiChatOptions
public VertexAiGeminiChatOptions()
-
-
Method Details
-
builder
- Returns:
- Returns FunctionCallingOptionsBuilder to create a new instance of FunctionCallingOptions.
-
getStopSequences
- Specified by:
getStopSequences
in interfaceChatOptions
-
setStopSequences
-
getTemperature
- Specified by:
getTemperature
in interfaceChatOptions
-
setTemperature
-
getTopP
- Specified by:
getTopP
in interfaceChatOptions
-
setTopP
-
getTopK
- Specified by:
getTopK
in interfaceChatOptions
-
setTopK
-
setTopK
-
getCandidateCount
-
setCandidateCount
-
getMaxTokens
- Specified by:
getMaxTokens
in interfaceChatOptions
-
setMaxTokens
-
getMaxOutputTokens
-
setMaxOutputTokens
-
getModel
- Specified by:
getModel
in interfaceChatOptions
-
setModel
-
getResponseMimeType
-
setResponseMimeType
-
getFunctionCallbacks
Description copied from interface:FunctionCallingOptions
Function 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:
getFunctionCallbacks
in interfaceFunctionCallingOptions
- Returns:
- Return the Function Callbacks to be registered with the ChatModel.
-
setFunctionCallbacks
Description copied from interface:FunctionCallingOptions
Set the Function Callbacks to be registered with the ChatModel.- Specified by:
setFunctionCallbacks
in interfaceFunctionCallingOptions
- Parameters:
functionCallbacks
- the Function Callbacks to be registered with the ChatModel.
-
getFunctions
- Specified by:
getFunctions
in interfaceFunctionCallingOptions
- Returns:
- List of function names from the ChatModel registry to be used in the next chat completion requests.
-
setFunctions
Description copied from interface:FunctionCallingOptions
Set the list of function names from the ChatModel registry to be used in the next chat completion requests.- Specified by:
setFunctions
in interfaceFunctionCallingOptions
- Parameters:
functions
- the list of function names from the ChatModel registry to be used in the next chat completion requests.
-
getFrequencyPenalty
- Specified by:
getFrequencyPenalty
in interfaceChatOptions
-
getPresencePenalty
- Specified by:
getPresencePenalty
in interfaceChatOptions
-
getGoogleSearchRetrieval
public boolean getGoogleSearchRetrieval() -
setGoogleSearchRetrieval
public void setGoogleSearchRetrieval(boolean googleSearchRetrieval) -
getProxyToolCalls
- Specified by:
getProxyToolCalls
in interfaceFunctionCallingOptions
-
setProxyToolCalls
- Specified by:
setProxyToolCalls
in interfaceFunctionCallingOptions
-
getToolContext
- Specified by:
getToolContext
in interfaceFunctionCallingOptions
-
setToolContext
- Specified by:
setToolContext
in interfaceFunctionCallingOptions
-
equals
-
hashCode
public int hashCode() -
toString
-
copy
- Specified by:
copy
in interfaceChatOptions
-
fromOptions
-