diff --git a/README.md b/README.md index 1d1c699..cf23dbf 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ PentestGPT is tested under `Python 3.10`. Other Python3 versions should work but - `pip3 install -e .` 2. To use OpenAI API - **Ensure that you have link a payment method to your OpenAI account.** - - export your API key with `export OPENAI_KEY=''` + - export your API key with `export OPENAI_API_KEY=''` - export API base with `export OPENAI_BASEURL='https://api.xxxx.xxx/v1'`if you need. - Test the connection with `pentestgpt-connection` 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. diff --git a/pentestgpt/_version.py b/pentestgpt/_version.py index 6946c1d..f58cc74 100644 --- a/pentestgpt/_version.py +++ b/pentestgpt/_version.py @@ -1 +1 @@ -__version__ = '"0.13.0"' +__version__ = '"0.13.1"' diff --git a/pentestgpt/utils/APIs/azure_api.py b/pentestgpt/utils/APIs/azure_api.py index 0b8d9aa..2a7681c 100644 --- a/pentestgpt/utils/APIs/azure_api.py +++ b/pentestgpt/utils/APIs/azure_api.py @@ -45,7 +45,7 @@ class AzureGPTAPI(LLMAPI): def __init__(self, config_class, use_langfuse_logging=False): self.name = str(config_class.model) openai.api_type = "azure" - openai.api_key = os.getenv("OPENAI_KEY", None) + openai.api_key = os.getenv("OPENAI_API_KEY", None) openai.api_base = config_class.api_base self.model = config_class.model self.log_dir = config_class.log_dir diff --git a/pentestgpt/utils/APIs/chatgpt_api.py b/pentestgpt/utils/APIs/chatgpt_api.py index e40d8a1..6438a73 100644 --- a/pentestgpt/utils/APIs/chatgpt_api.py +++ b/pentestgpt/utils/APIs/chatgpt_api.py @@ -59,7 +59,7 @@ def __init__(self, config_class, use_langfuse_logging=False): self.langfuse = Langfuse() - openai.api_key = os.getenv("OPENAI_KEY", None) + openai.api_key = os.getenv("OPENAI_API_KEY", None) openai.api_base = config_class.api_base self.model = config_class.model self.log_dir = config_class.log_dir diff --git a/pentestgpt/utils/APIs/chatgpt_vision_api.py b/pentestgpt/utils/APIs/chatgpt_vision_api.py index e40d8a1..ccd3330 100644 --- a/pentestgpt/utils/APIs/chatgpt_vision_api.py +++ b/pentestgpt/utils/APIs/chatgpt_vision_api.py @@ -59,7 +59,7 @@ def __init__(self, config_class, use_langfuse_logging=False): self.langfuse = Langfuse() - openai.api_key = os.getenv("OPENAI_KEY", None) + openai.api_key = os.getenv("OPENAPI_API_KEY", None) openai.api_base = config_class.api_base self.model = config_class.model self.log_dir = config_class.log_dir diff --git a/pentestgpt/utils/APIs/module_import.py b/pentestgpt/utils/APIs/module_import.py index a2fe203..7373911 100644 --- a/pentestgpt/utils/APIs/module_import.py +++ b/pentestgpt/utils/APIs/module_import.py @@ -73,7 +73,9 @@ class GPT35Turbo16kConfigClass: # set up the openai key openai_key = os.getenv("OPENAI_API_KEY", None) if openai_key is None: - print("Your OPENAI_KEY is not set. Please set it in the environment variable.") + print( + "Your OPENAI_API_KEY is not set. Please set it in the environment variable." + ) error_wait_time: float = 20 is_debugging: bool = False diff --git a/pentestgpt/utils/vectorDB.py b/pentestgpt/utils/vectorDB.py index 3d78451..160b0c9 100644 --- a/pentestgpt/utils/vectorDB.py +++ b/pentestgpt/utils/vectorDB.py @@ -37,7 +37,7 @@ def __init__(self, project_name: str, vectordb_name: str): # load configurations pinecone_api_key = os.getenv("PINECONE_API_KEY", None) - os.environ["OPENAI_API_KEY"] = os.getenv("OPENAI_KEY", None) + os.environ["OPENAI_API_KEY"] = os.getenv("OPENAI_API_KEY", None) # save the abs directory of the vectorDB on top of the project directory self.vectordb_directory = os.path.join( os.path.dirname(os.path.dirname(os.path.abspath(__file__))), diff --git a/setup.py b/setup.py index 1617089..d9deedf 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( name="pentestgpt", - version="0.13.0", + version="0.13.1", description="PentestGPT, a GPT-empowered penetration testing tool", long_description=""" PentestGPT is a penetration testing tool empowered by ChatGPT.