Package com.tnsai.llm
Class ChatRequest.Builder
java.lang.Object
com.tnsai.llm.ChatRequest.Builder
- Enclosing class:
ChatRequest
Fluent builder for ChatRequest.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds an immutable ChatRequest.Sets conversation history.Sets the text message.messageParts(List<ContentPart> parts) Sets multimodal content parts.Adds a metadata entry.systemPrompt(String systemPrompt) Sets the system prompt.temperature(float temperature) Sets temperature override.Sets the tool catalog as JSON-Schema fragments (List<Map<String, Object>>per Anthropic-style tool-use).
-
Method Details
-
message
Sets the text message. -
messageParts
Sets multimodal content parts. -
systemPrompt
Sets the system prompt. -
history
Sets conversation history. -
tools
Sets the tool catalog as JSON-Schema fragments (List<Map<String, Object>>per Anthropic-style tool-use). -
temperature
Sets temperature override. -
metadata
Adds a metadata entry. -
build
Builds an immutable ChatRequest.- Throws:
IllegalStateException- if neither message nor messageParts is set
-