feat(solaris): add proper client initialization
This commit is contained in:
0
src/bot/modules/solaris/__init__.py
Normal file
0
src/bot/modules/solaris/__init__.py
Normal 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),
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
# мяу
|
||||
Reference in New Issue
Block a user