Record Class GenerationRequest
java.lang.Object
java.lang.Record
uno.anahata.asi.agi.provider.GenerationRequest
- Record Components:
config- The configuration for the generation request, including behavioral parameters (temperature, topK, etc.) and tool definitions.history- The list of messages forming the conversation history to be sent to the model. This list is typically filtered and processed by theContextManagerbefore being encapsulated in this request.
public record GenerationRequest(@NonNull RequestConfig config, @NonNull List<AbstractMessage> history)
extends Record
A simple, immutable record that encapsulates all the information required for
a model to generate content: the configuration and the conversation history.
This record serves as the primary input for the generateContent and
generateContentStream methods in AbstractModel. It decouples
the model implementation from the complex Agi orchestrator by
providing a snapshot of the request parameters and the relevant message history.
- Author:
- anahata-ai
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @NonNull RequestConfigThe field for theconfigrecord component.private final @NonNull List<AbstractMessage> The field for thehistoryrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionGenerationRequest(@NonNull RequestConfig config, @NonNull List<AbstractMessage> history) Creates an instance of aGenerationRequestrecord class. -
Method Summary
Modifier and TypeMethodDescription@NonNull RequestConfigconfig()Returns the value of theconfigrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NonNull List<AbstractMessage> history()Returns the value of thehistoryrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
Constructor Details
-
GenerationRequest
public GenerationRequest(@NonNull @NonNull RequestConfig config, @NonNull @NonNull List<AbstractMessage> history) Creates an instance of aGenerationRequestrecord class.
-
-
Method Details
-
toString
-
hashCode
-
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). -
config
-
history
-

