java.lang.Object
java.lang.Record
com.agentforge4j.llm.api.LlmExecutionRequest
- Record Components:
providerName- provider id (for example"openai"); must match the targetLlmClientmodel- model id for this call, ornullto use the client's configured defaultsystemPrompt- system instructions for the modeluserInput- user or tool-facing content for this turnmaxOutputTokens- optional cap on generated tokens (provider-specific; ignored whennull)promptLayerBoundaries- stable-prefix layer byte boundaries for prompt caching, ornullwhen caching is disabled or boundaries are unknownidentity- optional originating run/workflow/step/agent identity, ornullfor direct, run-less use; real providers ignore it
public record LlmExecutionRequest(String providerName, String model, String systemPrompt, String userInput, Integer maxOutputTokens, PromptLayerBoundaries promptLayerBoundaries, LlmInvocationIdentity identity)
extends Record
Immutable parameters for a single LLM invocation.
Construct via the canonical constructor — optional fields (maxOutputTokens,
promptLayerBoundaries, identity) are passed explicitly as null when absent,
and a null model selects the client's configured default. There are no convenience
factories: while the API is pre-0.1.0 we keep one canonical signature rather than shims.
-
Constructor Summary
ConstructorsConstructorDescriptionLlmExecutionRequest(String providerName, String model, String systemPrompt, String userInput, Integer maxOutputTokens, PromptLayerBoundaries promptLayerBoundaries, LlmInvocationIdentity identity) Validates that required fields are not blank and optional token cap is positive when set. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.identity()Returns the value of theidentityrecord component.Returns the value of themaxOutputTokensrecord component.model()Returns the value of themodelrecord component.Returns the value of thepromptLayerBoundariesrecord component.Returns the value of theproviderNamerecord component.Returns the value of thesystemPromptrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theuserInputrecord component.
-
Constructor Details
-
LlmExecutionRequest
public LlmExecutionRequest(String providerName, String model, String systemPrompt, String userInput, Integer maxOutputTokens, PromptLayerBoundaries promptLayerBoundaries, LlmInvocationIdentity identity) Validates that required fields are not blank and optional token cap is positive when set.- Throws:
IllegalArgumentException- if any required field is blank
-
-
Method Details
-
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). -
providerName
Returns the value of theproviderNamerecord component.- Returns:
- the value of the
providerNamerecord component
-
model
Returns the value of themodelrecord component.- Returns:
- the value of the
modelrecord component
-
systemPrompt
Returns the value of thesystemPromptrecord component.- Returns:
- the value of the
systemPromptrecord component
-
userInput
Returns the value of theuserInputrecord component.- Returns:
- the value of the
userInputrecord component
-
maxOutputTokens
Returns the value of themaxOutputTokensrecord component.- Returns:
- the value of the
maxOutputTokensrecord component
-
promptLayerBoundaries
Returns the value of thepromptLayerBoundariesrecord component.- Returns:
- the value of the
promptLayerBoundariesrecord component
-
identity
Returns the value of theidentityrecord component.- Returns:
- the value of the
identityrecord component
-