Custom ai message hehe

This commit is contained in:
Yasir Aris M 2024-07-31 22:00:42 +07:00 committed by GitHub
parent e93ff1ea0f
commit 96ada8d284
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -78,7 +78,26 @@ async def openai_chatbot(_, ctx: Message, strings):
try: try:
response = await ai.chat.completions.create( response = await ai.chat.completions.create(
model="gpt-4o", 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, temperature=0.7,
stream=True, stream=True,
) )