Skip to content

Commit

Permalink
Hard-coding paths for now
Browse files Browse the repository at this point in the history
  • Loading branch information
JMaynor committed Aug 21, 2024
1 parent 0069828 commit 5acc066
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ FROM python:3.12
RUN python -m pip install --upgrade pip
RUN mkdir /home/dolores
COPY . /home/dolores
WORKDIR /home/dolores
RUN python -m venv /home/dolores/.venv
RUN . /home/dolores/.venv/bin/activate
RUN pip install -r /home/dolores/requirements.txt
Expand Down
2 changes: 0 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
requests==2.32.3
pyyaml==6.0.2
yt-dlp==2024.8.6
py-cord[voice]==2.6.0
openai==1.41.0
apprise==1.8.1
Expand Down
3 changes: 2 additions & 1 deletion src/dolores.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
if os.environ["GENERATION_ENABLED"].lower() == "true":
bot.add_cog(generation(bot))

with open(os.path.join("..", "locales", "strings.json"), "r") as f:
strings_path = "/home/dolores/locales/strings.json"
with open(strings_path, "r") as f:
summary_exclude_strings = json.load(f).get("SUMMARY_EXCLUDED_STRINGS", [])


Expand Down
3 changes: 2 additions & 1 deletion src/modules/generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@

message_history = deque(maxlen=10)

with open(os.path.join("..", "locales", "strings.json"), "r") as f:
strings_path = "/home/dolores/locales/strings.json"
with open(strings_path, "r") as f:
json_data = json.load(f)
system_messages = json_data.get("LLM_SYSTEM_MESSAGES", [])
snarky_comments = json_data.get("SNARKY_COMMENTS", [])
Expand Down
3 changes: 2 additions & 1 deletion src/modules/rolling.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

from discord.ext import commands

with open(os.path.join("..", "locales", "strings.json"), "r") as f:
strings_path = "/home/dolores/locales/strings.json"
with open(strings_path, "r") as f:
sarcastic_names = json.load(f).get("SARCASTIC_NAMES", [])


Expand Down
3 changes: 2 additions & 1 deletion src/modules/scheduling.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@

twitch_headers = {"Authorization": "", "Client-ID": os.environ["TWITCH_CLIENT_ID"]}

with open(os.path.join("..", "locales", "strings.json"), "r") as f:
strings_path = "/home/dolores/locales/strings.json"
with open(strings_path, "r") as f:
sarcastic_names = json.load(f).get("SARCASTIC_NAMES", [])


Expand Down

0 comments on commit 5acc066

Please sign in to comment.