fix: Update import path for SafetySetting in TetoCog
This commit is contained in:
parent
03825d0f62
commit
8e6b9b6270
@ -15,7 +15,7 @@ import aiohttp
|
||||
|
||||
# Google Generative AI Imports (using Vertex AI backend)
|
||||
from google import genai
|
||||
from google.generativeai import types
|
||||
from google.genai import types
|
||||
from google.api_core import exceptions as google_exceptions
|
||||
|
||||
# Import project configuration for Vertex AI
|
||||
@ -24,10 +24,10 @@ from gurt.config import PROJECT_ID, LOCATION
|
||||
# Define standard safety settings using google.generativeai types
|
||||
# Set all thresholds to OFF as requested
|
||||
STANDARD_SAFETY_SETTINGS = [
|
||||
genai.types.SafetySetting(category=types.HarmCategory.HARM_CATEGORY_HATE_SPEECH, threshold="BLOCK_NONE"),
|
||||
genai.types.SafetySetting(category=types.HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT, threshold="BLOCK_NONE"),
|
||||
genai.types.SafetySetting(category=types.HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT, threshold="BLOCK_NONE"),
|
||||
genai.types.SafetySetting(category=types.HarmCategory.HARM_CATEGORY_HARASSMENT, threshold="BLOCK_NONE"),
|
||||
types.SafetySetting(category=types.HarmCategory.HARM_CATEGORY_HATE_SPEECH, threshold="BLOCK_NONE"),
|
||||
types.SafetySetting(category=types.HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT, threshold="BLOCK_NONE"),
|
||||
types.SafetySetting(category=types.HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT, threshold="BLOCK_NONE"),
|
||||
types.SafetySetting(category=types.HarmCategory.HARM_CATEGORY_HARASSMENT, threshold="BLOCK_NONE"),
|
||||
]
|
||||
|
||||
def strip_think_blocks(text):
|
||||
|
Loading…
x
Reference in New Issue
Block a user