mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-06-02 00:57:41 +08:00
fix: add missing model property to GoogleGeminiBot
api_key and api_base were refactored to @property but model was not migrated, causing AttributeError: 'GoogleGeminiBot' object has no attribute 'model' when using any Gemini model.
This commit is contained in:
@@ -34,6 +34,13 @@ class GoogleGeminiBot(Bot):
|
|||||||
def api_key(self):
|
def api_key(self):
|
||||||
return conf().get("gemini_api_key")
|
return conf().get("gemini_api_key")
|
||||||
|
|
||||||
|
@property
|
||||||
|
def model(self):
|
||||||
|
model_name = conf().get("model") or "gemini-pro"
|
||||||
|
if model_name == "gemini":
|
||||||
|
model_name = "gemini-pro"
|
||||||
|
return model_name
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def api_base(self):
|
def api_base(self):
|
||||||
base = conf().get("gemini_api_base", "").strip()
|
base = conf().get("gemini_api_base", "").strip()
|
||||||
|
|||||||
Reference in New Issue
Block a user