Skip to content

Running the python module in local mode only still requires TAVILY retriever to be setup. #1111

@danieldekay

Description

@danieldekay

Describe the bug
I am running this code: https://docs.gptr.dev/docs/gpt-researcher/context/tailored-research#research-on-local-documents-
My environment has all the keys for the LLM, but no retriever set up.

INFO:     [17:05:13] 🔍 Starting the research task for 'What can you tell me about myself based on my documents?'...
INFO:     [17:05:13] 🔍 Personal Data Analysis Agent
INFO:     [17:05:13] 🌐 Browsing the web to learn more about the task: What can you tell me about myself based on my documents?...
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
except KeyError:

File <frozen os>:679, in __getitem__(self, key)

KeyError: 'TAVILY_API_KEY'

During handling of the above exception, another exception occurred:

Exception: Tavily API key not found. Please set the TAVILY_API_KEY environment variable.

To Reproduce
Steps to reproduce the behavior:

  1. Copy the code from the documentation
  2. Run it inside a jupyzter notebook

Expected behavior
Should run on local documents without needing a retriever, and not fallback to TAVILY as default and try to use it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions