1
0
mirror of https://github.com/osmarks/autobotrobot synced 2025-02-07 12:40:00 +00:00

Switchabler LLM backend

This commit is contained in:
osmarks 2024-08-03 14:59:33 +01:00
parent 586c921e8b
commit c6a9379a21

View File

@ -344,8 +344,9 @@ async def generate(response: aiohttp.ClientSession, prompt):
"prompt": prompt,
"max_tokens": 200,
"stop": ["\n"],
"client": "abr"
}) as res:
"client": "abr",
**config["ai"].get("params", {})
}, headers=config["ai"].get("headers", {})) as res:
data = await res.json()
return data["choices"][0]["text"]