Spaces:
Sleeping
Sleeping
improve extraction
Browse files
duckdb-nsql/eval/prompt_formatters.py
CHANGED
@@ -135,7 +135,9 @@ class RajkumarFormatter:
|
|
135 |
return ensure_semicolon(output_sql[:semicolon_pos].strip())
|
136 |
|
137 |
# If no semicolon found, use the entire text
|
138 |
-
|
|
|
|
|
139 |
|
140 |
@classmethod
|
141 |
def format_gold_output(cls, output_sql: str) -> str:
|
|
|
135 |
return ensure_semicolon(output_sql[:semicolon_pos].strip())
|
136 |
|
137 |
# If no semicolon found, use the entire text
|
138 |
+
extracted = ensure_semicolon(output_sql.strip())
|
139 |
+
extracted = extracted.replace('```sql','').replace('```','').strip()
|
140 |
+
return extracted
|
141 |
|
142 |
@classmethod
|
143 |
def format_gold_output(cls, output_sql: str) -> str:
|