feat(solaris): moving to service system to support multi-chat

This commit is contained in:
h
2025-07-05 01:13:12 +03:00
parent fd84210a65
commit 41927a1e07
16 changed files with 143 additions and 74 deletions

View 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],
# )