add basic sysprompt

This commit is contained in:
Xory 2025-08-20 21:36:17 +03:00
parent e6054f88c6
commit b79d892d34
3 changed files with 12 additions and 2 deletions

View file

@ -3,7 +3,7 @@ from google.genai import types
from dotenv import load_dotenv
from discord import app_commands
from discord.ext import commands
from tools import searxng, open_url, run_command
from tools import searxng, run_command, open_url
from traceback import print_exc
from typing import Optional
import asyncio
@ -13,9 +13,13 @@ import discord
load_dotenv()
sysprompt = ""
with open("sysprompt.md", "r") as sysprompt_file:
sysprompt = sysprompt_file.read()
client = genai.Client(api_key=os.getenv("GEM_API_KEY"))
config = types.GenerateContentConfig(
tools=[searxng, open_url, run_command],
system_instruction=sysprompt,
safety_settings=[
types.SafetySetting(
category=types.HarmCategory.HARM_CATEGORY_CIVIC_INTEGRITY,