Skip to content

Commit f5bc2b5

Browse files
authored
fix: output parser bug (#1864)
fixes: #1831
1 parent 9da919e commit f5bc2b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ragas/prompt/pydantic_prompt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ async def parse_output_string(
394394
llm: BaseRagasLLM,
395395
callbacks: Callbacks,
396396
retries_left: int = 1,
397-
):
397+
) -> OutputModel:
398398
callbacks = callbacks or []
399399
try:
400400
jsonstr = extract_json(output_string)
@@ -416,7 +416,7 @@ async def parse_output_string(
416416
retries_left=retries_left - 1,
417417
)
418418
retry_rm.on_chain_end({"fixed_output_string": fixed_output_string})
419-
result = fixed_output_string
419+
result = super().parse(fixed_output_string.text)
420420
else:
421421
raise RagasOutputParserException()
422422
return result

0 commit comments

Comments
 (0)