provider(bard): add save

This commit is contained in:
0xMRTT 2023-05-05 01:15:21 +02:00
parent d8cca9f7a2
commit 48547c53a0
Signed by: 0xmrtt
GPG key ID: 19C1449A774028BD

View file

@ -75,7 +75,10 @@ class BardProvider(BavarderProvider):
about.present()
def save(self):
return {"api_key": self.api_key}
try:
return {"api_key": self.api_key}
except AttributeError: # no api key
return {}
def load(self, data):
self.chat = BardChat(api_key)