barretlee
Joined 3 years ago
Joined 3 years ago
As an example, if we want to implement a web scraper program to collect and save webpage images, handing this task over to ChatGPT would result in a string of executable code but with potential problems such as execution errors or missing dependencies. This requires multiple conversations with ChatGPT to create a complete program. Of course, we could set up a more complex prompt to instruct ChatGPT to execute code plugins, but with the AutoGen framework, it can be simplified to just a few lines of code:
1) Define an Assistant Agent that solves problems. 2) Define a UserProxy Agent that substitutes human inquiries and executes programs on the local machine.
Neither of these agents requires a prompt. When we hand over the web scraper task to UserProxy, it understands the task, inquires of Assistant how to proceed, and following Assistant's instructions, UserProxy installs dependencies locally, creates files, executes code, and reports detailed error messages to Assistant if any problems arise. This process repeats until the final result is obtained. When the task is completed, the target image is saved to the local disk.
AutoGen has a wide range of capabilities, and best practices can be found in the project's notebook: https://github.com/microsoft/autogen/tree/main/notebook
P.S. To ensure safety, it is recommended to perform program execution in a Docker environment. UserProxy has a code_execution_config configuration, which can be set to True for use_docker. Additionally, there is a human_input_mode parameter that can be set to NEVER to automate the entire process or to wait for human input, allowing for people to participate in the task execution process and avoid mistakes.
In fact, this type of issue exists in all peer-to-peer connections based on WebRTC. It exposes the true IP address during the signaling process, ICE candidate gathering, connection establishment, and communication phases.
In reality, if you want to obtain someone's IP, it's not that difficult once they answer the call. You can simply send a disguised link for them to click on, and any arbitrary request on the web page can collect various endpoint information .
This project also demonstrates how to use Wireshark to monitor network card information and intercept data packets. The code portion is quite instructive and worth learning from.
- Twitter: <https://twitter.com/Barret_China> - Github: <https://github.com/barretlee> - Personal Blog: <https://www.barretlee.com>