MCPcopy Create free account
hub / github.com/Alibaba-NLP/VRAG / extract_json

Function extract_json

VRAG-RL/scripts/data_construct_pipeline.py:76–80  ·  view source on GitHub ↗
(response)

Source from the content-addressed store, hash-verified

74prompt_user_start = """Question: {question}"""
75
76def extract_json(response):
77 response = response.replace("```json","").replace("```","")
78 response = response.replace("```\n","").replace("\n```","")
79 response_json = json.loads(response)
80 return response_json
81
82def crop_and_dump(image_path, bbox, output_folder=image_output_dir):
83 if not os.path.exists(output_folder):

Callers 1

cot_collectMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected