Package com.tnsai.llm.format
Class JsonModeClient.Builder
java.lang.Object
com.tnsai.llm.format.JsonModeClient.Builder
- Enclosing class:
JsonModeClient
Builder for JsonModeClient.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the JsonModeClient.client(com.tnsai.llm.LLMClient client) Sets the LLM client to wrap.forcePromptEngineering(boolean force) Forces prompt engineering even if provider supports native JSON mode.objectMapper(com.fasterxml.jackson.databind.ObjectMapper mapper) Sets a custom ObjectMapper for JSON parsing.responseFormat(ResponseFormat format) Sets the response format.schemaFromClass(String name, Class<?> clazz) Creates a JSON Schema format from the given class.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
client
Sets the LLM client to wrap. -
responseFormat
Sets the response format. -
objectMapper
Sets a custom ObjectMapper for JSON parsing. -
forcePromptEngineering
Forces prompt engineering even if provider supports native JSON mode. -
schemaFromClass
Creates a JSON Schema format from the given class. -
build
Builds the JsonModeClient.
-