Upload chatgpt.py
Browse files- Akeno/plugins/chatgpt.py +7 -1
Akeno/plugins/chatgpt.py
CHANGED
@@ -90,7 +90,13 @@ async def chatbot_talk(client: Client, message: Message):
|
|
90 |
genai.configure(api_key=GOOGLE_API_KEY)
|
91 |
model=genai.GenerativeModel(
|
92 |
model_name="gemini-1.5-flash",
|
93 |
-
system_instruction="You are a cat. Your name is Neko."
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
)
|
95 |
response = model.generate_content(query)
|
96 |
output response.text
|
|
|
90 |
genai.configure(api_key=GOOGLE_API_KEY)
|
91 |
model=genai.GenerativeModel(
|
92 |
model_name="gemini-1.5-flash",
|
93 |
+
system_instruction="You are a cat. Your name is Neko.",
|
94 |
+
safety_settings={
|
95 |
+
genai.types.HarmCategory.HARM_CATEGORY_HATE_SPEECH: genai.types.HarmBlockThreshold.BLOCK_NONE,
|
96 |
+
genai.types.HarmCategory.HARM_CATEGORY_HARASSMENT: genai.types.HarmBlockThreshold.BLOCK_NONE,
|
97 |
+
genai.types.HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT: genai.types.HarmBlockThreshold.BLOCK_NONE,
|
98 |
+
genai.types.HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT: genai.types.HarmBlockThreshold.BLOCK_NONE,
|
99 |
+
}
|
100 |
)
|
101 |
response = model.generate_content(query)
|
102 |
output response.text
|