Interface LLMProvider.LLMRequest

All Superinterfaces:
Serializable
Enclosing interface:
LLMProvider

public static interface LLMProvider.LLMRequest extends Serializable
Represents a request to the LLM containing all necessary context, configuration, and tools. Requests are immutable.
  • Method Details

    • userMessage

      String userMessage()
      Gets the user's message.
      Returns:
      the user message, never null
    • attachments

      Gets the list of file attachments to include with the request. Attachments can be images, PDFs, text files, or other supported formats that the LLM can analyze and reference in its response.
      Returns:
      the list of attachments, never null but may be empty
    • systemPrompt

      String systemPrompt()
      Gets the system prompt for this specific request. The system prompt defines the LLM's behavior, role, and constraints. If null, the provider may use its own internal default system prompt.
      Returns:
      the system prompt, or null if not specified
    • tools

      Object[] tools()
      Gets the tool objects for this request. Tool objects are classes with vendor-specific annotations (e.g., LangChain4j's @Tool, Spring AI's @Tool) that the provider can introspect and convert to native tool definitions.
      Returns:
      array of tool objects, never null but may be empty