LlmRequest
LlmRequest represents a request to an LLM.
Constructors
Types
Fluent builder for LlmRequest, provided primarily for Java callers. Any property left unset falls back to the same default as the constructor. The internal toolsDict is request-processing state populated by appendTools, not a caller input, so it has no public setter; LlmRequest.toBuilder carries it over.
Properties
Prompt token count from the previous request, used to gate cache creation on a minimum size.
Context cache configuration for this request. When null, context caching is disabled for the request.
Cache metadata carried over from previous requests, used to validate and reuse an existing cache.
The configuration for generating content.
Functions
Appends a content block to the request.
Appends instructions to the system instruction.
Appends tools to the request and merges any new function declarations.
Returns a Builder initialized with this instance's properties, primarily for Java callers. Prefer it over copy from Java: copy takes every property positionally, so its signature changes whenever a property is added.