mirror of
https://github.com/kurbezz/discord-bot.git
synced 2025-12-06 15:15:37 +01:00
Fix
This commit is contained in:
@@ -98,7 +98,7 @@ async def get_completion(messages: list[dict]) -> str:
|
|||||||
data_messages = [
|
data_messages = [
|
||||||
{
|
{
|
||||||
"role": "system",
|
"role": "system",
|
||||||
"content": "Don't use markdown! Don't use blocked words on Twitch! Make answers short and clear!"
|
"content": "Don't use markdown! Don't use blocked words on Twitch! Make answers short and clear! Your name is kurbezz!"
|
||||||
},
|
},
|
||||||
*(
|
*(
|
||||||
{
|
{
|
||||||
@@ -213,6 +213,13 @@ class MessagesProc:
|
|||||||
part,
|
part,
|
||||||
reply_parent_message_id=event.message_id
|
reply_parent_message_id=event.message_id
|
||||||
)
|
)
|
||||||
|
|
||||||
|
cls.update_message_history(
|
||||||
|
id="ai",
|
||||||
|
text=part,
|
||||||
|
user="kurbezz",
|
||||||
|
thread_id=event.message_id
|
||||||
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error("Failed to get completion: {}", e, exc_info=True)
|
logger.error("Failed to get completion: {}", e, exc_info=True)
|
||||||
|
|
||||||
@@ -247,6 +254,13 @@ class MessagesProc:
|
|||||||
part,
|
part,
|
||||||
reply_parent_message_id=event.message_id
|
reply_parent_message_id=event.message_id
|
||||||
)
|
)
|
||||||
|
|
||||||
|
cls.update_message_history(
|
||||||
|
id="ai",
|
||||||
|
text=part,
|
||||||
|
user="kurbezz",
|
||||||
|
thread_id=event.message_id
|
||||||
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Failed to get completion: {e}")
|
logger.error(f"Failed to get completion: {e}")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user