Package com.tnsai.integration.scop
Class LLMResponse
java.lang.Object
com.tnsai.integration.scop.LLMResponse
Wrapper for LLM responses (TEXT, TOOL_CALLS, or ERROR).
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic LLMResponsestatic LLMResponseRetains a diagnostic message and the original failure locally.Gets displayable content (text content or error message).Original local failure; never serialize it into a public response.org.json.JSONObjectFixed display text derived only from a typedLLMExceptioncategory, never from diagnostics; a generic message when no typed failure is retained.org.json.JSONArraygetType()booleanhasText()booleanbooleanstatic LLMResponsestatic LLMResponsetoolCalls(org.json.JSONArray toolCalls, org.json.JSONObject rawMessage)
-
Method Details
-
text
-
toolCalls
-
error
-
error
Retains a diagnostic message and the original failure locally. Neither is public display text; usegetSafeErrorMessage()at that boundary.getErrorMessage()andgetDisplayContent()keep their existing diagnostic behaviour.- Since:
- 0.17.5
-
getType
-
getContent
-
getToolCalls
public org.json.JSONArray getToolCalls() -
getRawMessage
public org.json.JSONObject getRawMessage() -
getErrorMessage
-
getException
Original local failure; never serialize it into a public response. @since 0.17.5 -
getSafeErrorMessage
Fixed display text derived only from a typedLLMExceptioncategory, never from diagnostics; a generic message when no typed failure is retained.nullfor non-ERROR responses.- Since:
- 0.17.5
-
isSuccess
public boolean isSuccess() -
hasToolCalls
public boolean hasToolCalls() -
hasText
public boolean hasText() -
getDisplayContent
Gets displayable content (text content or error message).
-