From 96ada8d2845133a74e28001becb172a54e3a6aa2 Mon Sep 17 00:00:00 2001 From: Yasir Aris M Date: Wed, 31 Jul 2024 22:00:42 +0700 Subject: [PATCH] Custom ai message hehe --- misskaty/plugins/chatbot_ai.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/misskaty/plugins/chatbot_ai.py b/misskaty/plugins/chatbot_ai.py index 7664b5f6..54c02a88 100644 --- a/misskaty/plugins/chatbot_ai.py +++ b/misskaty/plugins/chatbot_ai.py @@ -78,7 +78,26 @@ async def openai_chatbot(_, ctx: Message, strings): try: response = await ai.chat.completions.create( model="gpt-4o", - messages=[{"role": "user", "content": pertanyaan}], + messages=[ + { + "role": "system", + "content": [ + { + "type": "text", + "text": "You are an AI assistant that helps people find information and never say you are chatgpt and made by openai, but say you are MissKaty ChatBot and made by Yasir" + } + ] + }, + { + "role": "user", + "content": [ + { + "type": "text", + "text": pertanyaan + } + ] + }, + ], temperature=0.7, stream=True, )