silly things :3
This commit is contained in:
parent
2750b5fa78
commit
e07865d607
4 changed files with 39 additions and 2 deletions
13
Dockerfile
Normal file
13
Dockerfile
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
FROM python:3.12
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY ./requirements.txt ./
|
||||||
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
COPY ./main.py ./
|
||||||
|
COPY ./tools.py ./
|
||||||
|
COPY ./.env ./
|
||||||
|
|
||||||
|
RUN useradd app
|
||||||
|
USER app
|
||||||
|
CMD ["python", "main.py"]
|
||||||
|
|
@ -7,5 +7,5 @@ A search engine in your discord client.
|
||||||
- [X] Command exec
|
- [X] Command exec
|
||||||
- [X] Image & PDF recognitiion
|
- [X] Image & PDF recognitiion
|
||||||
- [ ] Research
|
- [ ] Research
|
||||||
- [ ] Image creation(?)
|
|
||||||
- [ ] VC capabilities (difficult af to implement)
|
- [ ] VC capabilities (difficult af to implement)
|
||||||
|
- [ ] ~~Image creation~~ (thrown out due to payment requirements)
|
||||||
|
|
|
||||||
25
main.py
25
main.py
|
|
@ -15,7 +15,30 @@ load_dotenv()
|
||||||
|
|
||||||
client = genai.Client(api_key=os.getenv("GEM_API_KEY"))
|
client = genai.Client(api_key=os.getenv("GEM_API_KEY"))
|
||||||
config = types.GenerateContentConfig(
|
config = types.GenerateContentConfig(
|
||||||
tools=[searxng, open_url, run_command]
|
tools=[searxng, open_url, run_command],
|
||||||
|
safety_settings=[
|
||||||
|
types.SafetySetting(
|
||||||
|
category=types.HarmCategory.HARM_CATEGORY_CIVIC_INTEGRITY,
|
||||||
|
threshold=types.HarmBlockThreshold.BLOCK_NONE
|
||||||
|
),
|
||||||
|
types.SafetySetting(
|
||||||
|
category=types.HarmCategory.HARM_CATEGORY_HARASSMENT,
|
||||||
|
threshold=types.HarmBlockThreshold.BLOCK_NONE
|
||||||
|
),
|
||||||
|
types.SafetySetting(
|
||||||
|
category=types.HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT,
|
||||||
|
threshold=types.HarmBlockThreshold.BLOCK_NONE
|
||||||
|
),
|
||||||
|
types.SafetySetting(
|
||||||
|
category=types.HarmCategory.HARM_CATEGORY_HATE_SPEECH,
|
||||||
|
threshold=types.HarmBlockThreshold.BLOCK_NONE
|
||||||
|
),
|
||||||
|
types.SafetySetting(
|
||||||
|
category=types.HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT,
|
||||||
|
threshold=types.HarmBlockThreshold.BLOCK_NONE
|
||||||
|
),
|
||||||
|
|
||||||
|
]
|
||||||
)
|
)
|
||||||
intents = discord.Intents.default()
|
intents = discord.Intents.default()
|
||||||
intents.message_content = True
|
intents.message_content = True
|
||||||
|
|
|
||||||
|
|
@ -2,3 +2,4 @@ google-genai
|
||||||
python-dotenv
|
python-dotenv
|
||||||
discord.py
|
discord.py
|
||||||
markdownify
|
markdownify
|
||||||
|
aiohttp
|
||||||
Loading…
Add table
Add a link
Reference in a new issue