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,17 +96,11 @@ 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": "assistant" if message["user"] == "kurbezz" else "user",
|
||||||
"content": message["text"]
|
"content": message["text"]
|
||||||
}
|
}
|
||||||
for message in messages
|
for message in messages
|
||||||
),
|
|
||||||
{
|
|
||||||
"role": "system",
|
|
||||||
"content": "Don't use markdown! Don't use blocked words on Twitch! Make answers short and clear!"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
|
|
||||||
async with AsyncClient() as client:
|
async with AsyncClient() as client:
|
||||||
|
|||||||
Reference in New Issue
Block a user