Skip to content

Conversation

@Redamency
Copy link

We better load our .env before we load the modules from hello-agents
If we load like this

    from hello_agents import SimpleAgent, HelloAgentsLLM, ToolRegistry
    from hello_agents.tools import MemoryTool, RAGTool
    load_dotenv()

We will encounter a problem:
If our virtual python environment like this

~/Desktop/OpenManus/.venv/lib/python3.12/site-packages/hello_agents

But our test file like this

~/Desktop/hello-agents/chapter8/test.py

when we load config in this file

~/Desktop/OpenManus/.venv/lib/python3.12/site-packages/hello_agents/core/database_config.py

we can't get the properties we have set in ~/Desktop/hello-agents/chapter8/.env
The singleton pattern for creating Qdrant instances within QdrantConnectionManager will fail, resulting in an error.

@jjyaoao
Copy link
Collaborator

jjyaoao commented Nov 1, 2025

Hi, thank for you advice. The code in chapter8 is pseudocode. Because starting from this chapter, our code can no longer be fully displayed in the main text. So you do not need add load_dotenv() in text. If our example code can't run without this. You could add in code.

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