You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that there are two identical class definitions for GeminiAdapter in the same file. This appears to be an unintended duplication.
File: fastchat/model/model_adapter.py
Lines: 1202-1212 and 2193-2205
# fastchat/model/model_adapter.py# line 1202classGeminiAdapter(BaseModelAdapter):
"""The model adapter for Gemini"""defmatch(self, model_path: str):
return"gemini"inmodel_path.lower() or"bard"inmodel_path.lower()
defload_model(self, model_path: str, from_pretrained_kwargs: dict):
raiseNotImplementedError()
defget_default_conv_template(self, model_path: str) ->Conversation:
returnget_conv_template("gemini")
# line 2193classGeminiAdapter(BaseModelAdapter):
"""The model adapter for Gemini"""defmatch(self, model_path: str):
return"gemini"inmodel_path.lower() or"bard"inmodel_path.lower()
defload_model(self, model_path: str, from_pretrained_kwargs: dict):
raiseNotImplementedError()
defget_default_conv_template(self, model_path: str) ->Conversation:
if"gemini-1.5-pro"inmodel_path:
returnget_conv_template("gemini-1.5-pro")
returnget_conv_template("gemini")
The classes are identical except for the get_default_conv_template method. The second definition includes an additional check for "gemini-1.5-pro".
Suggestion:
Consider merging these two class definitions, keeping the more specific get_default_conv_template method from the second definition. This would avoid confusion and potential issues with class resolution.
Please let me know if you need any further information or clarification.
The text was updated successfully, but these errors were encountered:
I've noticed that there are two identical class definitions for
GeminiAdapter
in the same file. This appears to be an unintended duplication.fastchat/model/model_adapter.py
The classes are identical except for the
get_default_conv_template
method. The second definition includes an additional check for "gemini-1.5-pro".Suggestion:
Consider merging these two class definitions, keeping the more specific
get_default_conv_template
method from the second definition. This would avoid confusion and potential issues with class resolution.Please let me know if you need any further information or clarification.
The text was updated successfully, but these errors were encountered: