kagi_fastgpt: fix issue when there are no more tk.
This commit is contained in:
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…
Reference in a new issue