Spaces:
Sleeping
Sleeping
Commit ·
52dc17f
1
Parent(s): ca1e893
bugfix: fix minor bugs
Browse files
utils/completion_reward.py
CHANGED
|
@@ -425,10 +425,10 @@ class MTKAgent:
|
|
| 425 |
).json()
|
| 426 |
response_text = response["choices"][0]["message"]["content"]
|
| 427 |
|
| 428 |
-
|
| 429 |
-
|
| 430 |
-
|
| 431 |
-
)
|
| 432 |
|
| 433 |
chinese_converter = OpenCC("s2tw")
|
| 434 |
|
|
|
|
| 425 |
).json()
|
| 426 |
response_text = response["choices"][0]["message"]["content"]
|
| 427 |
|
| 428 |
+
matched_contents = re.findall("```(.*?)```", response_text, re.DOTALL)
|
| 429 |
+
|
| 430 |
+
# Concatenate all extracted contents
|
| 431 |
+
extracted_content = "\n".join(matched_contents).strip()
|
| 432 |
|
| 433 |
chinese_converter = OpenCC("s2tw")
|
| 434 |
|