mirror of
https://github.com/osmarks/autobotrobot
synced 2025-02-07 12:40:00 +00:00
Switchabler LLM backend
This commit is contained in:
parent
586c921e8b
commit
c6a9379a21
@ -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"]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user