Package dev.dokimos.core
Class LlmResponseUtils
java.lang.Object
dev.dokimos.core.LlmResponseUtils
Utility methods for processing LLM responses.
Provides common parsing functionality for handling responses from
JudgeLM implementations.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringstripMarkdown(String response) Strips markdown code block formatting from an LLM response.
-
Method Details
-
stripMarkdown
Strips markdown code block formatting from an LLM response.Many LLMs wrap JSON responses in markdown code blocks like:
```json {"key": "value"} ```This method removes such formatting to extract the raw content.- Parameters:
response- the LLM response that may contain markdown formatting- Returns:
- the response with markdown code block formatting removed
-