From 48b109eb315e45e499be1d6e0c06c40e4bb6f479 Mon Sep 17 00:00:00 2001 From: shinrei Date: Tue, 1 Jul 2025 15:26:04 +0000 Subject: [PATCH] solarisclient --- .env.example | 3 +++ src/bot/modules/solaris/client.py | 16 ++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index c54ff69..a9da007 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,7 @@ BOT__TOKEN= +GOOGLE_API_KEY= + +GROUP_ID= DB__HOST=mongodb DB__PORT=27017 diff --git a/src/bot/modules/solaris/client.py b/src/bot/modules/solaris/client.py index 527878a..6dea4f3 100644 --- a/src/bot/modules/solaris/client.py +++ b/src/bot/modules/solaris/client.py @@ -1,2 +1,14 @@ -class Solaris: - pass \ No newline at end of file +import os +from google import genai +from google.genai.types import GenerateContentConfig, ThinkingConfig + +class SolarisClient: + def __init__(self) -> None: + client = genai.Client(api_key=os.getenv('GOOGLE_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) + ) + ) \ No newline at end of file