diff --git a/book_maker/translator/gemini_translator.py b/book_maker/translator/gemini_translator.py index 119114e..fc4eb61 100644 --- a/book_maker/translator/gemini_translator.py +++ b/book_maker/translator/gemini_translator.py @@ -16,20 +16,15 @@ generation_config = { "temperature": 1.0, "top_p": 1, "top_k": 1, - "max_output_tokens": 2048, + "max_output_tokens": 8192, } -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", - }, +safety_settings = { + "HATE": "BLOCK_NONE", + "HARASSMENT": "BLOCK_NONE", + "SEXUAL": "BLOCK_NONE", + "DANGEROUS": "BLOCK_NONE", +} PROMPT_ENV_MAP = { "user": "BBM_GEMINIAPI_USER_MSG_TEMPLATE",