Skip to content
Snippets Groups Projects
Unverified Commit 720959a9 authored by Phuc Van Phan's avatar Phuc Van Phan Committed by GitHub
Browse files

fix: add postpreprocess_output_processor to json_query.py (#11862)

parent 62e1545e
No related branches found
No related tags found
No related merge requests found
......@@ -63,6 +63,9 @@ def default_output_response_parser(llm_output: str) -> str:
def default_output_processor(llm_output: str, json_value: JSONType) -> JSONType:
"""Default output processor that extracts values based on JSON Path expressions."""
# Post-process the LLM output to remove the JSONPath: prefix
llm_output = llm_output.replace("JSONPath: ", "").replace("JSON Path: ", "").strip()
# Split the given string into separate JSON Path expressions
expressions = [expr.strip() for expr in llm_output.split(",")]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment