Spaces:
Running
Running
Fix: 8192 ctx window + trim safety context to 3000 chars
Browse files- safety_checker.py +1 -1
safety_checker.py
CHANGED
|
@@ -110,7 +110,7 @@ def run_safety_check(context: str, call_model_fn) -> SafetyReport:
|
|
| 110 |
"<|im_start|>system\n"
|
| 111 |
"Extract medications and allergies from clinical documents. Output ONLY valid JSON.<|im_end|>\n"
|
| 112 |
"<|im_start|>user\n"
|
| 113 |
-
+ EXTRACTION_PROMPT.format(context=context[:
|
| 114 |
+ "\n<|im_end|>\n<|im_start|>assistant\n"
|
| 115 |
)
|
| 116 |
|
|
|
|
| 110 |
"<|im_start|>system\n"
|
| 111 |
"Extract medications and allergies from clinical documents. Output ONLY valid JSON.<|im_end|>\n"
|
| 112 |
"<|im_start|>user\n"
|
| 113 |
+
+ EXTRACTION_PROMPT.format(context=context[:3000])
|
| 114 |
+ "\n<|im_end|>\n<|im_start|>assistant\n"
|
| 115 |
)
|
| 116 |
|