mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-09 12:59:43 +00:00
refactor: Refactor proxy LLM (#1064)
This commit is contained in:
@@ -178,14 +178,15 @@ class FalconChatAdapter(BaseChatAdpter):
|
||||
return falcon_generate_output
|
||||
|
||||
|
||||
class ProxyllmChatAdapter(BaseChatAdpter):
|
||||
def match(self, model_path: str):
|
||||
return "proxyllm" in model_path
|
||||
|
||||
def get_generate_stream_func(self, model_path: str):
|
||||
from dbgpt.model.llm_out.proxy_llm import proxyllm_generate_stream
|
||||
|
||||
return proxyllm_generate_stream
|
||||
#
|
||||
# class ProxyllmChatAdapter(BaseChatAdpter):
|
||||
# def match(self, model_path: str):
|
||||
# return "proxyllm" in model_path
|
||||
#
|
||||
# def get_generate_stream_func(self, model_path: str):
|
||||
# from dbgpt.model.llm_out.proxy_llm import proxyllm_generate_stream
|
||||
#
|
||||
# return proxyllm_generate_stream
|
||||
|
||||
|
||||
class GorillaChatAdapter(BaseChatAdpter):
|
||||
@@ -286,6 +287,6 @@ register_llm_model_chat_adapter(LlamaCppChatAdapter)
|
||||
register_llm_model_chat_adapter(InternLMChatAdapter)
|
||||
|
||||
# Proxy model for test and develop, it's cheap for us now.
|
||||
register_llm_model_chat_adapter(ProxyllmChatAdapter)
|
||||
# register_llm_model_chat_adapter(ProxyllmChatAdapter)
|
||||
|
||||
register_llm_model_chat_adapter(BaseChatAdpter)
|
||||
|
Reference in New Issue
Block a user