mirror of
https://github.com/kurbezz/discord-bot.git
synced 2025-12-06 07:05:36 +01:00
Fix
This commit is contained in:
@@ -96,11 +96,17 @@ async def get_completion(messages: list[dict]) -> str:
|
|||||||
logger.info(f"Getting completion for message: {messages}")
|
logger.info(f"Getting completion for message: {messages}")
|
||||||
|
|
||||||
data_messages = [
|
data_messages = [
|
||||||
{
|
# {
|
||||||
"role": "assistant" if message["user"] == "kurbezz" else "user",
|
# "role": "system",
|
||||||
"content": message["text"]
|
# "content": "Don't use markdown! Don't use blocked words on Twitch! Make answers short and clear!"
|
||||||
}
|
# },
|
||||||
for message in messages
|
*(
|
||||||
|
{
|
||||||
|
"role": "assistant" if message["user"] == "kurbezz" else "user",
|
||||||
|
"content": message["text"]
|
||||||
|
}
|
||||||
|
for message in messages
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
async with AsyncClient() as client:
|
async with AsyncClient() as client:
|
||||||
|
|||||||
Reference in New Issue
Block a user