Skip to content

Commit

Permalink
fix multi-agents path issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ElishaKay committed Aug 15, 2024
1 parent c9e5641 commit 0fa478a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ WORKDIR /usr/src/app
COPY ./requirements.txt ./requirements.txt
RUN pip install -r requirements.txt

COPY ./multi_agents/requirements.txt ./multi_agents/requirements.txt
RUN pip install -r multi_agents/requirements.txt

FROM gpt-researcher-install AS gpt-researcher

RUN useradd -ms /bin/bash gpt-researcher \
Expand Down
9 changes: 7 additions & 2 deletions multi_agents/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@
load_dotenv()

def open_task():
with open('task.json', 'r') as f:
# Get the directory of the current script
current_dir = os.path.dirname(os.path.abspath(__file__))
# Construct the absolute path to task.json
task_json_path = os.path.join(current_dir, 'task.json')

with open(task_json_path, 'r') as f:
task = json.load(f)

if not task:
raise Exception("No task provided. Please include a task.json file in the root directory.")
raise Exception("No task provided. Please include a task.json file in the multi_agents directory.")

return task

Expand Down
2 changes: 0 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ lxml_html_clean
websockets
unstructured
json_repair
json5
langgraph

# uncomment for testing
# pytest
Expand Down

0 comments on commit 0fa478a

Please sign in to comment.