From e4d3d0fe5677f45fd5c19d27d7dd9eb613624af3 Mon Sep 17 00:00:00 2001 From: nexy7574 Date: Thu, 6 Jun 2024 00:59:00 +0100 Subject: [PATCH] Update jimmy to use the new API endpoints --- src/cogs/ollama.py | 4 ++-- src/cogs/quote_quota.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cogs/ollama.py b/src/cogs/ollama.py index 943ed60..50f67c1 100644 --- a/src/cogs/ollama.py +++ b/src/cogs/ollama.py @@ -1051,11 +1051,11 @@ class Ollama(commands.Cog): system ) async with httpx.AsyncClient() as client: - r = CONFIG["truth"].get("api", "https://bots.nexy7574.co.uk/jimmy/v2") + r = CONFIG["truth"].get("api", "https://bots.nexy7574.co.uk/jimmy/v2/api") username = CONFIG["truth"].get("username", "1") password = CONFIG["truth"].get("password", "2") response = await client.get( - r + "/api/truths/all", + r + "/truths", timeout=60, auth=(username, password), ) diff --git a/src/cogs/quote_quota.py b/src/cogs/quote_quota.py index 99cb24b..67464a5 100644 --- a/src/cogs/quote_quota.py +++ b/src/cogs/quote_quota.py @@ -336,11 +336,11 @@ class QuoteQuota(commands.Cog): ) await ctx.respond(embed=embed) async with httpx.AsyncClient() as client: - r = CONFIG["truth"].get("api", "https://bots.nexy7574.co.uk/jimmy/v2") + r = CONFIG["truth"].get("api", "https://bots.nexy7574.co.uk/jimmy/v2/api") username = CONFIG["truth"].get("username", "1") password = CONFIG["truth"].get("password", "2") response = await client.get( - r + "/api/truths/all", + r + "/truths", timeout=60, auth=(username, password), )