can be overrided to costomize the conversation template for different model workers.
(
self,
conv_template: str = None,
model_path: str = None,
)
| 61 | worker = self |
| 62 | |
| 63 | def make_conv_template( |
| 64 | self, |
| 65 | conv_template: str = None, |
| 66 | model_path: str = None, |
| 67 | ) -> Conversation: |
| 68 | """ |
| 69 | can be overrided to costomize the conversation template for different model workers. |
| 70 | """ |
| 71 | from fastchat.conversation import get_conv_template |
| 72 | from fastchat.model.model_adapter import get_conversation_template |
| 73 | |
| 74 | if conv_template: |
| 75 | conv = get_conv_template(conv_template) |
| 76 | else: |
| 77 | conv = get_conversation_template(model_path) |
| 78 | return conv |
| 79 | |
| 80 | def init_heart_beat(self): |
| 81 | self.register_to_controller() |
no test coverage detected