Skip to content

Commit ac66567

Browse files
committed
Update coc_plugin.py
1 parent c7d0016 commit ac66567

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

optillm/plugins/coc_plugin.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,10 @@ def sanitize_code(code: str) -> str:
108108
# Add safety wrapper
109109
wrapper = f"""
110110
{imports}
111-
112111
def safe_execute():
113112
import numpy as np # Always allow numpy
114-
{safe_code.replace('\n', '\n ')}
113+
{safe_code.replace('\\n', '\\n ')}
115114
return answer if 'answer' in locals() else None
116-
117115
result = safe_execute()
118116
answer = result
119117
"""

0 commit comments

Comments
 (0)