mirror of
https://github.com/osmarks/autobotrobot
synced 2025-06-27 23:53:04 +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,
|
"prompt": prompt,
|
||||||
"max_tokens": 200,
|
"max_tokens": 200,
|
||||||
"stop": ["\n"],
|
"stop": ["\n"],
|
||||||
"client": "abr"
|
"client": "abr",
|
||||||
}) as res:
|
**config["ai"].get("params", {})
|
||||||
|
}, headers=config["ai"].get("headers", {})) as res:
|
||||||
data = await res.json()
|
data = await res.json()
|
||||||
return data["choices"][0]["text"]
|
return data["choices"][0]["text"]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user