Coder Social home page Coder Social logo

Comments (2)

r1cs3c avatar r1cs3c commented on August 26, 2024

I raised a new issue by mistake, moving text here and closing the issue. I have the same problem and I have plus. Here is my description:

Trying to test the new changes to the tool, I run into the following error as soon as I tried. As you can see test_connection seems to work:

python3 test_connection.py 
#### Test connection for chatgpt cookie
1. You're connected with ChatGPT Plus cookie. 
To start PentestGPT, please use <python3 main.py --reasoning_model=gpt-4 --useAPI=False>
#### Test connection for OpenAI api (GPT-4)
The OpenAI API key is not properly configured. Please follow README to update OpenAI API key in config/chatgpt_config.py
#### Test connection for OpenAI api (GPT-3.5)
The OpenAI API key is not properly configured. Please follow README to update OpenAI API key in config/chatgpt_config.py

but main doesn't:

python3 main.py --reasoning_model=gpt-4 --useAPI=False
- ChatGPT Sessions Initialized.
Please describe the penetration testing task in one line, including the target IP, task type, e
> test localhost 127.0.0.1
Traceback (most recent call last):
  File "/media/psf/Documents/GitHub/PentestGPT/main.py", line 25, in <module>
    pentestGPTHandler.main()
  File "/media/psf/Documents/GitHub/PentestGPT/utils/pentest_gpt.py", line 466, in main
    _response = self.reasoning_handler(prefixed_init_description)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/media/psf/Documents/GitHub/PentestGPT/utils/pentest_gpt.py", line 128, in reasoning_handler
    response = self.chatGPT4Agent.send_message(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/media/psf/Documents/GitHub/PentestGPT/utils/chatgpt_api.py", line 92, in send_message
    conversation = self.conversation_dict[conversation_id]
                   ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
KeyError: None

from pentestgpt.

GreyDGL avatar GreyDGL commented on August 26, 2024

This problem should be fixed. You may refer to the latest documentation. Note that there is a change in the tool usage. Now --useAPI does not require input params. If you use OpenAI API, you can do it with python3 main.py --reasoning_model=gpt-4 --useAPI. Otherwise, just use python3 main.py --reasoning_model=gpt-4.

from pentestgpt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.