update gemini user_msg doc

This commit is contained in:
better629 2023-12-14 16:54:56 +08:00
parent c4fbc478d2
commit 91d1ab20cc

View file

@ -36,6 +36,8 @@ class GeminiGPTAPI(BaseGPTAPI):
genai.configure(api_key=config.gemini_api_key)
def _user_msg(self, msg: str) -> dict[str, str]:
# Not to change BaseGPTAPI default functions but update with Gemini's conversation format.
# You should follow the format.
return {"role": "user", "parts": [msg]}
def _assistant_msg(self, msg: str) -> dict[str, str]: