fix single quote block in llm answer (#3139)

This commit is contained in:
pablonyx
2024-12-16 12:37:47 -08:00
committed by GitHub
parent cbbf10f450
commit 788b3015bc
2 changed files with 21 additions and 1 deletions

View File

@@ -65,7 +65,7 @@ class CitationProcessor:
# Handle code blocks without language tags
if "`" in self.curr_segment:
if self.curr_segment.endswith("`"):
return
pass
elif "```" in self.curr_segment:
piece_that_comes_after = self.curr_segment.split("```")[1][0]
if piece_that_comes_after == "\n" and in_code_block(self.llm_out):