Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ollama fixes #856

Merged
merged 2 commits into from
Sep 19, 2024
Merged

Ollama fixes #856

merged 2 commits into from
Sep 19, 2024

Conversation

dharmapurikar
Copy link
Contributor

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 the get_subtopics function to return a dictionary.

Changes Made

The following changes have been made to address these issues:

  • Updated base.py to use the provided Ollama base URL.
  • Modified the get_subtopics function in report.py to return a dictionary instead of a list.

Steps to Reproduce the Fix

To reproduce the fix, follow these steps:

  1. Without fixes, run the gpt-researcher in using docker compose on WSL2

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.

…tinued to access default url of 127.0.0.1:11434. When this code was executed inside docker, this failed.
Copy link
Owner

@assafelovic assafelovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thank you so much for the contribution.

@assafelovic assafelovic merged commit f24e21c into assafelovic:master Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants