diff --git a/handlers/gemini.py b/handlers/gemini.py index 5205f13..3d22862 100644 --- a/handlers/gemini.py +++ b/handlers/gemini.py @@ -22,16 +22,10 @@ generation_config = { } safety_settings = [ - {"category": "HARM_CATEGORY_HARASSMENT", "threshold": "BLOCK_MEDIUM_AND_ABOVE"}, - {"category": "HARM_CATEGORY_HATE_SPEECH", "threshold": "BLOCK_MEDIUM_AND_ABOVE"}, - { - "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT", - "threshold": "BLOCK_MEDIUM_AND_ABOVE", - }, - { - "category": "HARM_CATEGORY_DANGEROUS_CONTENT", - "threshold": "BLOCK_MEDIUM_AND_ABOVE", - }, + {"category": "HARM_CATEGORY_HARASSMENT", "threshold": "BLOCK_NONE"}, + {"category": "HARM_CATEGORY_HATE_SPEECH", "threshold": "BLOCK_NONE"}, + {"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT", "threshold": "BLOCK_NONE"}, + {"category": "HARM_CATEGORY_DANGEROUS_CONTENT", "threshold": "BLOCK_NONE"}, ] # Global history cache diff --git a/handlers/yi.py b/handlers/yi.py index 635476c..1e6ed39 100644 --- a/handlers/yi.py +++ b/handlers/yi.py @@ -53,7 +53,6 @@ def yi_handler(message: Message, bot: TeleBot) -> None: player_message.pop() r = client.chat.completions.create(messages=player_message, model=YI_MODEL) content = r.choices[0].message.content.encode("utf8").decode() - print(content) if not content: yi_reply_text = "yi did not answer." player_message.pop() @@ -140,7 +139,6 @@ def yi_photo_handler(message: Message, bot: TeleBot) -> None: headers=headers, json=payload, ).json() - print(response) try: text = response["choices"][0]["message"]["content"].encode("utf8").decode() bot.reply_to(message, "yi vision answer:\n" + text)