Fix stupid aiohttp base url req
This commit is contained in:
parent
2863c2ea83
commit
35f1e4ac1e
1 changed files with 3 additions and 3 deletions
|
@ -144,7 +144,7 @@ class Ollama(commands.Cog):
|
||||||
await ctx.respond(embed=embed)
|
await ctx.respond(embed=embed)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
async with session.post("/show", json={"name": model}) as resp:
|
async with session.post("/api/show", json={"name": model}) as resp:
|
||||||
if resp.status not in [404, 200]:
|
if resp.status not in [404, 200]:
|
||||||
embed = discord.Embed(
|
embed = discord.Embed(
|
||||||
url=resp.url,
|
url=resp.url,
|
||||||
|
@ -185,7 +185,7 @@ class Ollama(commands.Cog):
|
||||||
|
|
||||||
last_update = time.time()
|
last_update = time.time()
|
||||||
|
|
||||||
async with session.post("/pull", json={"name": model, "stream": True}, timeout=None) as response:
|
async with session.post("/api/pull", json={"name": model, "stream": True}, timeout=None) as response:
|
||||||
if response.status != 200:
|
if response.status != 200:
|
||||||
embed = discord.Embed(
|
embed = discord.Embed(
|
||||||
url=response.url,
|
url=response.url,
|
||||||
|
@ -214,7 +214,7 @@ class Ollama(commands.Cog):
|
||||||
color=discord.Color.blurple()
|
color=discord.Color.blurple()
|
||||||
)
|
)
|
||||||
async with session.post(
|
async with session.post(
|
||||||
"/generate",
|
"/api/generate",
|
||||||
json={
|
json={
|
||||||
"model": model,
|
"model": model,
|
||||||
"prompt": query,
|
"prompt": query,
|
||||||
|
|
Loading…
Reference in a new issue