From 7b3ebb946d3406e4994f9c343e52d50ab89d9bef Mon Sep 17 00:00:00 2001 From: Neverbolt Date: Tue, 10 Dec 2024 17:08:54 +0100 Subject: [PATCH] Adds documentation about the beta viewer feature --- README.md | 16 ++++++++++++++++ src/hackingBuddyGPT/utils/logging.py | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9adfa67..083e302 100644 --- a/README.md +++ b/README.md @@ -306,6 +306,22 @@ Mac, Docker Desktop and Gemini-OpenAI-Proxy: * See https://github.com/ipa-lab/hackingBuddyGPT/blob/main/MAC.md +## Beta Features + +### Viewer + +The viewer is a simple web-based tool to view the results of hackingBuddyGPT runs. It is currently in beta and can be started with: + +```bash +$ hackingBuddyGPT Viewer +``` + +This will start a webserver on `http://localhost:4444` that can be accessed with a web browser. + +To log to this central viewer, you currently need to change the `GlobalLogger` definition in [./src/hackingBuddyGPT/utils/logging.py](src/hackingBuddyGPT/utils/logging.py) to `GlobalRemoteLogger`. + +This feature is not fully tested yet and therefore is not recommended to be exposed to the internet! + ## Publications about hackingBuddyGPT Given our background in academia, we have authored papers that lay the groundwork and report on our efforts: diff --git a/src/hackingBuddyGPT/utils/logging.py b/src/hackingBuddyGPT/utils/logging.py index a457e72..0ec0ca5 100644 --- a/src/hackingBuddyGPT/utils/logging.py +++ b/src/hackingBuddyGPT/utils/logging.py @@ -168,7 +168,7 @@ def add_message_update(self, message_id: int, action: StreamAction, content: str @dataclass class RemoteLogger: console: Console - log_server_address: str + log_server_address: str = "localhost:4444" tag: str = "" run: Run = field(init=False, default=None) @@ -378,4 +378,4 @@ def finalize(self, tokens_query: int, tokens_response: int, duration: datetime.t GlobalLocalLogger = Global(Transparent(Logger)) GlobalRemoteLogger = Global(Transparent(RemoteLogger)) -GlobalLogger = GlobalLocalLogger +GlobalLogger = GlobalRemoteLogger