Record Class LlmExecutionRequest

java.lang.Object
java.lang.Record
com.agentforge4j.llm.api.LlmExecutionRequest
Record Components:
providerName - provider id (for example "openai"); must match the target LlmClient
model - model id for this call, or null to use the client's configured default
systemPrompt - system instructions for the model
userInput - user or tool-facing content for this turn
maxOutputTokens - optional cap on generated tokens (provider-specific; ignored when null)
promptLayerBoundaries - stable-prefix layer byte boundaries for prompt caching, or null when caching is disabled or boundaries are unknown
identity - optional originating run/workflow/step/agent identity, or null for 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 Details

  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • providerName

      public String providerName()
      Returns the value of the providerName record component.
      Returns:
      the value of the providerName record component
    • model

      public String model()
      Returns the value of the model record component.
      Returns:
      the value of the model record component
    • systemPrompt

      public String systemPrompt()
      Returns the value of the systemPrompt record component.
      Returns:
      the value of the systemPrompt record component
    • userInput

      public String userInput()
      Returns the value of the userInput record component.
      Returns:
      the value of the userInput record component
    • maxOutputTokens

      public Integer maxOutputTokens()
      Returns the value of the maxOutputTokens record component.
      Returns:
      the value of the maxOutputTokens record component
    • promptLayerBoundaries

      public PromptLayerBoundaries promptLayerBoundaries()
      Returns the value of the promptLayerBoundaries record component.
      Returns:
      the value of the promptLayerBoundaries record component
    • identity

      public LlmInvocationIdentity identity()
      Returns the value of the identity record component.
      Returns:
      the value of the identity record component