Class RequestConfig
java.lang.Object
uno.anahata.asi.agi.event.BasicPropertyChangeSource
uno.anahata.asi.agi.provider.RequestConfig
- All Implemented Interfaces:
PropertyChangeSource, Rebindable
The definitive, model-agnostic configuration object for a single API request.
It holds both the static behavioral parameters and provides live, just-in-time
access to dynamic request data like tools and system instructions via its
reference to the parent Agi.
- Author:
- anahata-gemini-pro-2.5
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AgiThe parent Agi session this configuration belongs to.private IntegerThe number of response variations to generate.private List<ServerTool> The list of server-side tools enabled for this specific request.private booleanIf true, the adapter should include pruned messages and parts in the API request.private booleanIf true, in-band metadata headers are injected into the prompt for history pruning purposes.private IntegerThe maximum number of output tokens.private List<ResponseModality> The list of response modalities requested for this specific request.private StringThe raw JSON representation of the system instructions.private intThe total token count of the system instructions as reported by the provider.private FloatThe temperature for the request.private ThinkingLevelThe level of thinking tokens that the model should generate.private IntegerThe top K parameter.private FloatThe top P parameter.private booleanWhether to use the native provider Schema objects for tool parameters and responses, or to use our custom, purified JSON schemas.Fields inherited from class BasicPropertyChangeSource
propertyChangeSupport -
Constructor Summary
ConstructorsConstructorDescriptionRequestConfig(Agi agi) Constructs a new request configuration for the specified Agi. -
Method Summary
Modifier and TypeMethodDescriptionList<? extends AbstractTool> Gets the tools for this request, determined just-in-time based on the agi's configuration (local vs. server-side).Gets the system instructions for this request, assembled just-in-time by the ContextManager.booleanChecks if server-side tools (like Google Search) are enabled for this request.voidsetInjectInbandMetadata(boolean injectInbandMetadata) Sets whether in-band metadata headers should be injected into the prompt and fires a property change event.Methods inherited from class BasicPropertyChangeSource
addPropertyChangeListener, addPropertyChangeListener, rebind, removePropertyChangeListener, removePropertyChangeListenerMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PropertyChangeSource
getPropertyChangeSupport
-
Field Details
-
agi
The parent Agi session this configuration belongs to. -
temperature
The temperature for the request. -
maxOutputTokens
The maximum number of output tokens. -
topK
The top K parameter. -
topP
The top P parameter. -
candidateCount
The number of response variations to generate. -
thinkingLevel
The level of thinking tokens that the model should generate. -
responseModalities
The list of response modalities requested for this specific request. -
enabledServerTools
The list of server-side tools enabled for this specific request. -
includePruned
private boolean includePrunedIf true, the adapter should include pruned messages and parts in the API request. For debugging. -
injectInbandMetadata
private boolean injectInbandMetadataIf true, in-band metadata headers are injected into the prompt for history pruning purposes. -
useNativeSchemas
private boolean useNativeSchemasWhether to use the native provider Schema objects for tool parameters and responses, or to use our custom, purified JSON schemas. Defaults to false (using custom schemas). -
systemInstructionsTokenCount
private int systemInstructionsTokenCountThe total token count of the system instructions as reported by the provider. -
systemInstructionsRawJson
The raw JSON representation of the system instructions.
-
-
Constructor Details
-
RequestConfig
Constructs a new request configuration for the specified Agi.- Parameters:
agi- The parent session.
-
-
Method Details
-
setInjectInbandMetadata
public void setInjectInbandMetadata(boolean injectInbandMetadata) Sets whether in-band metadata headers should be injected into the prompt and fires a property change event.- Parameters:
injectInbandMetadata- true to enable in-band metadata injection.
-
getSystemInstructions
-
getLocalTools
Gets the tools for this request, determined just-in-time based on the agi's configuration (local vs. server-side).- Returns:
- A list of AbstractTools, or null if server-side tools are active.
-
isServerToolsEnabled
public boolean isServerToolsEnabled()Checks if server-side tools (like Google Search) are enabled for this request.- Returns:
- true if server tools are enabled.
-

