feat(solaris): moving to service system to support multi-chat
This commit is contained in:
28
src/bot/modules/solaris/constants.py
Normal file
28
src/bot/modules/solaris/constants.py
Normal file
@@ -0,0 +1,28 @@
|
||||
from google.genai import types
|
||||
|
||||
from .structures import OutputMessage
|
||||
|
||||
SAFETY_SETTINGS = [
|
||||
types.SafetySetting(category=category, threshold=types.HarmBlockThreshold.OFF)
|
||||
for category in types.HarmCategory
|
||||
]
|
||||
|
||||
|
||||
def generate_respond_config(prompt: str) -> types.GenerateContentConfig:
|
||||
return
|
||||
|
||||
|
||||
def generate_review_config(prompt: str) -> types.GenerateContentConfig:
|
||||
return types.GenerateContentConfig(
|
||||
system_instruction=prompt,
|
||||
thinking_config=types.ThinkingConfig(thinking_budget=0),
|
||||
response_mime_type="application/json",
|
||||
response_schema=list[int],
|
||||
safety_settings=SAFETY_SETTINGS,
|
||||
)
|
||||
|
||||
|
||||
# MESSAGE_CONTENT_CONFIG = types.GenerateContentConfig(
|
||||
# response_mime_type="application/json", # возможно можно скипнуть это если мы используем response_schema, надо проверить
|
||||
# response_schema=list[OutputMessage],
|
||||
# )
|
||||
Reference in New Issue
Block a user