Skip to content

Commit f072f90

Browse files
Vision (#230)
* fix: ๐Ÿ› fix OPENAI key setting issue and update readme * feat: ๐ŸŽธ update gpt4o * style: format code with Black This commit fixes the style issues introduced in 99581a8 according to the output from Black. Details: #229 * fix: ๐Ÿ› fix OPENAI_KEY typo * style: format code with Black This commit fixes the style issues introduced in 8f9091c according to the output from Black. Details: #230 --------- Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
1 parent 7fa106b commit f072f90

File tree

8 files changed

+10
-8
lines changed

8 files changed

+10
-8
lines changed

โ€ŽREADME.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ PentestGPT is tested under `Python 3.10`. Other Python3 versions should work but
100100
- `pip3 install -e .`
101101
2. To use OpenAI API
102102
- **Ensure that you have link a payment method to your OpenAI account.**
103-
- export your API key with `export OPENAI_KEY='<your key here>'`
103+
- export your API key with `export OPENAI_API_KEY='<your key here>'`
104104
- export API base with `export OPENAI_BASEURL='https://api.xxxx.xxx/v1'`if you need.
105105
- Test the connection with `pentestgpt-connection`
106106
3. To verify that the connection is configured properly, you may run `pentestgpt-connection`. After a while, you should see some sample conversation with ChatGPT.

โ€Žpentestgpt/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '"0.13.0"'
1+
__version__ = '"0.13.1"'

โ€Žpentestgpt/utils/APIs/azure_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class AzureGPTAPI(LLMAPI):
4545
def __init__(self, config_class, use_langfuse_logging=False):
4646
self.name = str(config_class.model)
4747
openai.api_type = "azure"
48-
openai.api_key = os.getenv("OPENAI_KEY", None)
48+
openai.api_key = os.getenv("OPENAI_API_KEY", None)
4949
openai.api_base = config_class.api_base
5050
self.model = config_class.model
5151
self.log_dir = config_class.log_dir

โ€Žpentestgpt/utils/APIs/chatgpt_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def __init__(self, config_class, use_langfuse_logging=False):
5959

6060
self.langfuse = Langfuse()
6161

62-
openai.api_key = os.getenv("OPENAI_KEY", None)
62+
openai.api_key = os.getenv("OPENAI_API_KEY", None)
6363
openai.api_base = config_class.api_base
6464
self.model = config_class.model
6565
self.log_dir = config_class.log_dir

โ€Žpentestgpt/utils/APIs/chatgpt_vision_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def __init__(self, config_class, use_langfuse_logging=False):
5959

6060
self.langfuse = Langfuse()
6161

62-
openai.api_key = os.getenv("OPENAI_KEY", None)
62+
openai.api_key = os.getenv("OPENAPI_API_KEY", None)
6363
openai.api_base = config_class.api_base
6464
self.model = config_class.model
6565
self.log_dir = config_class.log_dir

โ€Žpentestgpt/utils/APIs/module_import.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ class GPT35Turbo16kConfigClass:
7373
# set up the openai key
7474
openai_key = os.getenv("OPENAI_API_KEY", None)
7575
if openai_key is None:
76-
print("Your OPENAI_KEY is not set. Please set it in the environment variable.")
76+
print(
77+
"Your OPENAI_API_KEY is not set. Please set it in the environment variable."
78+
)
7779
error_wait_time: float = 20
7880
is_debugging: bool = False
7981

โ€Žpentestgpt/utils/vectorDB.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def __init__(self, project_name: str, vectordb_name: str):
3737

3838
# load configurations
3939
pinecone_api_key = os.getenv("PINECONE_API_KEY", None)
40-
os.environ["OPENAI_API_KEY"] = os.getenv("OPENAI_KEY", None)
40+
os.environ["OPENAI_API_KEY"] = os.getenv("OPENAI_API_KEY", None)
4141
# save the abs directory of the vectorDB on top of the project directory
4242
self.vectordb_directory = os.path.join(
4343
os.path.dirname(os.path.dirname(os.path.abspath(__file__))),

โ€Žsetup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
setup(
99
name="pentestgpt",
10-
version="0.13.0",
10+
version="0.13.1",
1111
description="PentestGPT, a GPT-empowered penetration testing tool",
1212
long_description="""
1313
PentestGPT is a penetration testing tool empowered by ChatGPT.

0 commit comments

Comments
ย (0)