feat(solaris): add proper client initialization

This commit is contained in:
h
2025-07-01 18:46:16 +03:00
parent 61b9f2265f
commit 6d34e41c73
8 changed files with 32 additions and 15 deletions

View File

View File

@@ -1,20 +1,14 @@
import os
from google import genai
from google.genai.types import GenerateContentConfig, ThinkingConfig
from dotenv import load_dotenv
load_dotenv()
class SolarisClient:
def __init__(self) -> None:
client = genai.Client(api_key=os.getenv('GOOGLE_API_KEY')).aio
def __init__(self, api_key: str) -> None:
client = genai.Client(api_key=api_key).aio
self.chat = client.chats.create(
model="gemini-2.5-flash",
config=GenerateContentConfig(
system_instruction="meow meow meow", # надо где-то промпт хранить, в бд наверное хезе
thinking_config=ThinkingConfig(thinking_budget=0)
)
system_instruction="meow meow meow", # надо где-то промпт хранить, в бд наверное хезе
thinking_config=ThinkingConfig(thinking_budget=0),
),
)
# мяу