feature: add guanaco support #121

This commit is contained in:
csunny
2023-05-30 23:02:46 +08:00
parent 16c6986666
commit b0e22eff05
5 changed files with 163 additions and 7 deletions

View File

@@ -85,14 +85,15 @@ class CodeGenChatAdapter(BaseChatAdpter):
class GuanacoChatAdapter(BaseChatAdpter):
"""Model chat adapter for Guanaco"""
"""Model chat adapter for Guanaco """
def match(self, model_path: str):
return "guanaco" in model_path
def get_generate_stream_func(self):
# TODO
pass
from pilot.model.guanaco_llm import guanaco_generate_output
return guanaco_generate_output
class ProxyllmChatAdapter(BaseChatAdpter):
@@ -107,6 +108,7 @@ class ProxyllmChatAdapter(BaseChatAdpter):
register_llm_model_chat_adapter(VicunaChatAdapter)
register_llm_model_chat_adapter(ChatGLMChatAdapter)
register_llm_model_chat_adapter(GuanacoChatAdapter)
# Proxy model for test and develop, it's cheap for us now.
register_llm_model_chat_adapter(ProxyllmChatAdapter)