Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
GPT Researcher - Fix Issues when Running in Docker Container
Issue Description
The GPT Researcher tool was unable to complete research tasks with Ollama when run inside a Docker container on WSL2. This issue has been resolved by addressing two key problems.
Issue 1: Incorrect Ollama Base URL
By default, the tool attempted to connect to
localhost
instead of using the provided base URL for Ollama. We have updated the code to use the provided base URL when running in a Docker container.Issue 2: Error in Generating Detailed Report
When generating detailed reports, we encountered an error because
get_subtopics
was sending a list instead of a dictionary. This has been corrected by updating theget_subtopics
function to return a dictionary.Changes Made
The following changes have been made to address these issues:
base.py
to use the provided Ollama base URL.get_subtopics
function inreport.py
to return a dictionary instead of a list.Steps to Reproduce the Fix
To reproduce the fix, follow these steps:
Code Changes
The code changes made to address these issues include updating the following files:
base.py
report.py
The updated code can be found in the attached code snippet.