Update handler.py
Browse files- handler.py +3 -1
handler.py
CHANGED
|
@@ -71,7 +71,9 @@ class EndpointHandler:
|
|
| 71 |
template_tokenizer = self.tokenizer
|
| 72 |
if hasattr(template_tokenizer, "chat_template") and template_tokenizer.chat_template:
|
| 73 |
self.tokenizer.chat_template = template_tokenizer.chat_template
|
| 74 |
-
print(f"Successfully imported chat template from {self.chat_template_id}")
|
|
|
|
|
|
|
| 75 |
|
| 76 |
|
| 77 |
def _get_policy_prompt(self):
|
|
|
|
| 71 |
template_tokenizer = self.tokenizer
|
| 72 |
if hasattr(template_tokenizer, "chat_template") and template_tokenizer.chat_template:
|
| 73 |
self.tokenizer.chat_template = template_tokenizer.chat_template
|
| 74 |
+
print(f"Successfully imported chat template from {self.chat_template_id}")
|
| 75 |
+
except Exception as e:
|
| 76 |
+
print(f"Failed to import chat template: {e}")
|
| 77 |
|
| 78 |
|
| 79 |
def _get_policy_prompt(self):
|