-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Description
Currently, Lucidia's modules reference hard-coded paths and API keys (e.g., the memory file and OpenAI API key). This makes it difficult to configure the project across different environments. We should centralize configuration and load values from environment variables or a .env file.
Proposed work
- Add a
config.pymodule that reads environment variables for values such asMEMORY_FILE_PATH,CONTRADICTIONS_FILE_PATH, andOPENAI_API_KEY, falling back to sensible defaults. - Use the
python-dotenvpackage to load variables from a.envfile automatically during development. - Update
chatgpt_agent.py,memory_manager.py, andcontradiction_agent.pyto fetch values from the configuration module instead of hard-coded strings. - Create a
.env.examplefile with sample variables and add instructions in the README for creating a local.env. - Ensure that missing or invalid configuration values result in clear error messages.
Acceptance criteria
- Lucidia reads configuration values from environment variables or a
.envfile and falls back to defaults if not provided. - The repository contains a
config.pyand a.env.exampleillustrating required settings. - Updated modules no longer contain hard-coded file paths or API keys.
- Tests verify that configuration values are loaded correctly and that defaults are used when variables are absent.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels