Skip to content

Commit

Permalink
Discord bot: fix model caching (part 1/999)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stax124 committed Jun 19, 2024
1 parent 2e63c29 commit 4f444c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bot/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ async def load_model(self, ctx: Context, model: str) -> None:

if status == 200:
await message.edit(content=f"{response['message']}: {model}")
await shared_bot.models.refresh_available_models()
await shared_bot.models.refresh_loaded_models()
else:
await message.edit(content=f"Error: **{response.get('detail')}**")

Expand All @@ -122,7 +122,7 @@ async def unload_model(self, ctx: Context, model: str) -> None:

if status == 200:
await message.edit(content=f"{response['message']}: {model}")
await shared_bot.models.refresh_available_models()
await shared_bot.models.refresh_loaded_models()
else:
await message.edit(content=f"Error: {status}")

Expand Down

0 comments on commit 4f444c5

Please sign in to comment.