Skip to content

Commit 0f99dc3

Browse files
committed
Add usage of loading env vars in .env file
Add the usage of loading environment variables from a `.env` file in `vulnhuntr/LLMs.py`. * **Add dependency**: Add `python-dotenv` to `pyproject.toml` and `requirements.txt`. * **Load environment variables**: Import `dotenv` and call `dotenv.load_dotenv()` at the beginning of `vulnhuntr/LLMs.py`.
1 parent 0c95e35 commit 0f99dc3

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

Diff for: pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ structlog = "^24.2.0"
1818
jedi = "0.18.0"
1919
parso = "0.8.0"
2020
openai = "^1.51.2"
21+
python-dotenv = "^1.0.0"
2122

2223
[build-system]
2324
requires = ["poetry-core"]

Diff for: requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -484,3 +484,4 @@ typing-extensions==4.12.2 ; python_version >= "3.10" and python_version < "4.0"
484484
urllib3==2.2.2 ; python_version >= "3.10" and python_version < "4.0" \
485485
--hash=sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472 \
486486
--hash=sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168
487+
python-dotenv==1.0.0

Diff for: vulnhuntr/LLMs.py

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
import anthropic
55
import os
66
import openai
7+
import dotenv
8+
9+
dotenv.load_dotenv()
710

811
log = logging.getLogger(__name__)
912

0 commit comments

Comments
 (0)