Record Class InteractionParams.ModelInteractionParams
java.lang.Object
java.lang.Record
io.github.glaforge.gemini.interactions.model.InteractionParams.ModelInteractionParams
- Record Components:
model- The model to use (e.g., "gemini-2.5-flash").input- The input content (String, Content, List<Content>, List<Turn>).generationConfig- Configuration for generation.tools- List of tools available for the interaction.stream- Whether to stream the response.store- Whether to store the interaction.background- Whether to run in background.systemInstruction- System instruction for the model.responseModalities- Requested response modalities.responseFormat- Requested response format (JSON Schema).responseMimeType- Requested response MIME type.previousInteractionId- ID of the previous interaction to continue.
- All Implemented Interfaces:
InteractionParams.Request
- Enclosing class:
InteractionParams
public static record InteractionParams.ModelInteractionParams(String model, Object input, Config.GenerationConfig generationConfig, List<Tool> tools, Boolean stream, Boolean store, Boolean background, String systemInstruction, List<Interaction.Modality> responseModalities, Object responseFormat, String responseMimeType, String previousInteractionId)
extends Record
implements InteractionParams.Request
Parameters for creating a model interaction.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for CreateModelInteractionParams. -
Constructor Summary
ConstructorsConstructorDescriptionModelInteractionParams(String model, Object input, Config.GenerationConfig generationConfig, List<Tool> tools, Boolean stream, Boolean store, Boolean background, String systemInstruction, List<Interaction.Modality> responseModalities, Object responseFormat, String responseMimeType, String previousInteractionId) Creates an instance of aModelInteractionParamsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebackgroundrecord component.builder()Returns a new builder for model interaction parameters.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegenerationConfigrecord component.final inthashCode()Returns a hash code value for this object.input()Returns the value of theinputrecord component.model()Returns the value of themodelrecord component.Returns the value of thepreviousInteractionIdrecord component.Returns the value of theresponseFormatrecord component.Returns the value of theresponseMimeTyperecord component.Returns the value of theresponseModalitiesrecord component.store()Returns the value of thestorerecord component.stream()Returns the value of thestreamrecord component.Returns the value of thesystemInstructionrecord component.tools()Returns the value of thetoolsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ModelInteractionParams
public ModelInteractionParams(String model, Object input, Config.GenerationConfig generationConfig, List<Tool> tools, Boolean stream, Boolean store, Boolean background, String systemInstruction, List<Interaction.Modality> responseModalities, Object responseFormat, String responseMimeType, String previousInteractionId) Creates an instance of aModelInteractionParamsrecord class.- Parameters:
model- the value for themodelrecord componentinput- the value for theinputrecord componentgenerationConfig- the value for thegenerationConfigrecord componenttools- the value for thetoolsrecord componentstream- the value for thestreamrecord componentstore- the value for thestorerecord componentbackground- the value for thebackgroundrecord componentsystemInstruction- the value for thesystemInstructionrecord componentresponseModalities- the value for theresponseModalitiesrecord componentresponseFormat- the value for theresponseFormatrecord componentresponseMimeType- the value for theresponseMimeTyperecord componentpreviousInteractionId- the value for thepreviousInteractionIdrecord component
-
-
Method Details
-
builder
Returns a new builder for model interaction parameters.- Returns:
- a new builder for model interaction parameters.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
model
Returns the value of themodelrecord component.- Returns:
- the value of the
modelrecord component
-
input
Returns the value of theinputrecord component.- Returns:
- the value of the
inputrecord component
-
generationConfig
Returns the value of thegenerationConfigrecord component.- Returns:
- the value of the
generationConfigrecord component
-
tools
Returns the value of thetoolsrecord component.- Returns:
- the value of the
toolsrecord component
-
stream
Returns the value of thestreamrecord component.- Specified by:
streamin interfaceInteractionParams.Request- Returns:
- the value of the
streamrecord component
-
store
Returns the value of thestorerecord component.- Returns:
- the value of the
storerecord component
-
background
Returns the value of thebackgroundrecord component.- Returns:
- the value of the
backgroundrecord component
-
systemInstruction
Returns the value of thesystemInstructionrecord component.- Returns:
- the value of the
systemInstructionrecord component
-
responseModalities
Returns the value of theresponseModalitiesrecord component.- Returns:
- the value of the
responseModalitiesrecord component
-
responseFormat
Returns the value of theresponseFormatrecord component.- Returns:
- the value of the
responseFormatrecord component
-
responseMimeType
Returns the value of theresponseMimeTyperecord component.- Returns:
- the value of the
responseMimeTyperecord component
-
previousInteractionId
Returns the value of thepreviousInteractionIdrecord component.- Returns:
- the value of the
previousInteractionIdrecord component
-