modify: model settings

This commit is contained in:
Risin 2024-10-15 18:49:04 +09:00
parent 4649ad1aaf
commit 92cdadbfdf

View File

@ -16,20 +16,15 @@ generation_config = {
"temperature": 1.0, "temperature": 1.0,
"top_p": 1, "top_p": 1,
"top_k": 1, "top_k": 1,
"max_output_tokens": 2048, "max_output_tokens": 8192,
} }
safety_settings = [ safety_settings = {
{"category": "HARM_CATEGORY_HARASSMENT", "threshold": "BLOCK_MEDIUM_AND_ABOVE"}, "HATE": "BLOCK_NONE",
{"category": "HARM_CATEGORY_HATE_SPEECH", "threshold": "BLOCK_MEDIUM_AND_ABOVE"}, "HARASSMENT": "BLOCK_NONE",
{ "SEXUAL": "BLOCK_NONE",
"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT", "DANGEROUS": "BLOCK_NONE",
"threshold": "BLOCK_MEDIUM_AND_ABOVE", }
},
{
"category": "HARM_CATEGORY_DANGEROUS_CONTENT",
"threshold": "BLOCK_MEDIUM_AND_ABOVE",
},
PROMPT_ENV_MAP = { PROMPT_ENV_MAP = {
"user": "BBM_GEMINIAPI_USER_MSG_TEMPLATE", "user": "BBM_GEMINIAPI_USER_MSG_TEMPLATE",