MCPcopy
hub / github.com/Codium-ai/AlphaCodium / postprocess_response

Function postprocess_response

alpha_codium/gen/utils.py:37–45  ·  view source on GitHub ↗
(response)

Source from the content-addressed store, hash-verified

35
36
37def postprocess_response(response):
38 response = str(response)
39 if response.endswith("stop"):
40 response = response[:-4]
41 pattern = r'```\w*\n(.*?)```'
42 matches = re.findall(pattern, response, re.DOTALL)
43 if matches:
44 response = matches[0]
45 return response
46
47
48def evaluate_solution_on_subset(evaluation_test_type, problem, solution, silent=False, break_on_timeout=True):

Callers 3

run_baselineFunction · 0.90
run_self_reflectFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected