Interface LLMProvider.LLMRequest
- All Superinterfaces:
Serializable
- Enclosing interface:
LLMProvider
Represents a request to the LLM containing all necessary context,
configuration, and tools. Requests are immutable.
-
Method Summary
Modifier and TypeMethodDescriptionGets the list of file attachments to include with the request.default List<LLMProvider.ToolSpec> Gets the explicit tool definitions for this request.Gets the system prompt for this specific request.Object[]tools()Gets the tool objects for this request.Gets the user's message.
-
Method Details
-
userMessage
String userMessage()Gets the user's message.- Returns:
- the user message, never
null
-
attachments
List<AIAttachment> 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
nullbut 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. Ifnull, the provider may use its own internal default system prompt.- Returns:
- the system prompt, or
nullif 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
nullbut may be empty
-
explicitTools
Gets the explicit tool definitions for this request. Unlike vendor-specific annotated tools returned bytools(), these are framework-agnostic tool definitions provided programmatically (typically byAIControllerinstances).- Returns:
- list of explicit tool definitions, never
nullbut may be empty
-