Skip to content

[Bug]: Generate_Script and Review_Script doesn't use config.json when run through docker. #83

Description

@jcc10

What happened?

generate_script.py and review_script.py will always attempt to run from http://localhost:11434/v1 even if the configuration has been changed.

Steps to reproduce

  1. Run in docker compose.
  2. Change configuration of LLM server.
  3. Try generating a script.

Terminal / log output

Unused/Irrelevant

GPU

NVIDIA (Linux)

GPU model and VRAM

No response

TTS Mode

Local (built-in)

Voice type (if relevant)

Not applicable

Additional context

The following patch seems to fix the bug in generate_script.py, but may introduce bugs in other run modes:

diff --git a/app/generate_script.py b/app/generate_script.py
index 0189c2c..8f0ccb8 100644
--- a/app/generate_script.py
+++ b/app/generate_script.py
@@ -418,7 +418,7 @@ def main():
         return
 
     # Load LLM config
-    config_path = os.path.join(os.path.dirname(__file__), "config.json")
+    config_path = os.getenv("ALEXANDRIA_CONFIG_PATH", "/alexandria/config/config.json")
     config = {}
     if os.path.exists(config_path):
         try:

Only just realized review_script.py had problems. A review should be done to ensure all steps involving the LLM read the configured endpoint.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions