kagi_fastgpt: fix issue when there are no more tk.

master
Adrien Abraham 2 months ago
parent bc2666085c
commit a2de02b0eb

@ -49,7 +49,10 @@ class KagiFastgptPlugin(Plugin):
self.bot.log_e(f"Request error: {exc}")
return None, []
data = response.json().get("data", {})
data = response.json().get("data")
if not data:
self.bot.log_w("No data at all, no more tokens available?")
return None, []
self.bot.log_d(f"Data received: {json.dumps(data)}")
output = data.get("output", "")
if not output:

Loading…
Cancel
Save