From 9d8ef19f6b2a015a48bc1f578896b6b2edda2395 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Kalsnes=20Hagen?= <43886029+Snailedlt@users.noreply.github.com> Date: Fri, 1 Nov 2024 08:58:42 +0100 Subject: [PATCH 1/5] update README with better looking youtube thumbnail --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c286de6..a6a4521 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ Options: ## Demo -[![Demo Video](https://img.youtube.com/vi/7OJ4w5BCpQ0/0.jpg)](https://www.youtube.com/watch?v=7OJ4w5BCpQ0) +[![Demo Video](http://markdown-videos-api.jorgenkh.no/youtube/7OJ4w5BCpQ0)](https://www.youtube.com/watch?v=7OJ4w5BCpQ0) ## Contributing From 825728786f81caeb2003566f4b40a223b014b44f Mon Sep 17 00:00:00 2001 From: Vishwanath Martur <64204611+vishwamartur@users.noreply.github.com> Date: Fri, 1 Nov 2024 14:07:30 +0530 Subject: [PATCH 2/5] Fix installation issues and update project structure Related to #1 Update project to resolve installation and module import issues. * **pyproject.toml**: Update the `name` field to "integuru" and add `[tool.poetry.scripts]` section with `integuru = "integuru.__main__:cli"` entry. * **main.ipynb**: Update all imports to use `integuru` instead of `integration_agent` and update the kernel name to match the new project name "integuru". * **README.md**: Update the usage instructions to reflect the new project name "integuru" and add instructions to register the Poetry virtual environment with Jupyter. * **integuru/agent.py**: Update import statements to use `integuru.util.LLM`, `integuru.models.DAGManager`, `integuru.util.har_processing`, `integuru.models.request`, and `integuru.models.agent_state` instead of `integration_agent.util.LLM`, `integration_agent.models.DAGManager`, `integration_agent.util.har_processing`, `integration_agent.models.request`, and `integration_agent.models.agent_state`. * **integuru/graph_builder.py**: Update import statements to use `integuru.models.agent_state`, `integuru.agent`, and `integuru.util.print` instead of `integration_agent.models.agent_state`, `integration_agent.agent`, and `integration_agent.util.print`. * **integuru/main.py**: Update import statements to use `integuru.graph_builder` and `integuru.util.LLM` instead of `integration_agent.graph_builder` and `integration_agent.util.LLM`. * **integuru/__main__.py**: Update the import statement to use `integuru.main` instead of `integration_agent.main`. * **integuru/models/DAGManager.py**: Remove unnecessary blank lines. * **tests/__init__.py**: Delete the file. --- README.md | 14 +++++++++----- integuru/agent.py | 1 - integuru/models/DAGManager.py | 2 -- main.ipynb | 4 ++-- pyproject.toml | 2 ++ tests/__init__.py | 0 6 files changed, 13 insertions(+), 10 deletions(-) delete mode 100644 tests/__init__.py diff --git a/README.md b/README.md index c286de6..4059680 100644 --- a/README.md +++ b/README.md @@ -49,14 +49,18 @@ Let's assume we want to download utility bills: ``` poetry shell ``` -4. Run the following command to spawn a browser: +4. Register the Poetry virtual environment with Jupyter: + ``` + poetry run ipython kernel install --user --name=integuru + ``` +5. Run the following command to spawn a browser: ``` poetry run python create_har.py ``` Log into your platform and perform the desired action (such as downloading a utility bill). -5. Run Integuru: +6. Run Integuru: ``` - poetry run python -m integuru --prompt "download utility bills" --model gpt-4o + poetry run integuru --prompt "download utility bills" --model gpt-4o ``` You can also run it via Jupyter Notebook `main.ipynb` @@ -67,8 +71,8 @@ Let's assume we want to download utility bills: After setting up the project, you can use Integuru to analyze and reverse-engineer API requests for external platforms. Simply provide the appropriate .har file and a prompt describing the action that you want to trigger. ``` -poetry run python -m integuru --help -Usage: python -m integuru [OPTIONS] +poetry run integuru --help +Usage: integuru [OPTIONS] Options: --model TEXT The LLM model to use (default is gpt-4o) diff --git a/integuru/agent.py b/integuru/agent.py index ef8bfbe..cb7b76a 100644 --- a/integuru/agent.py +++ b/integuru/agent.py @@ -409,4 +409,3 @@ def find_key_by_string_in_value(dictionary: Dict[str, Dict[str, Any]], search_st return key return None - diff --git a/integuru/models/DAGManager.py b/integuru/models/DAGManager.py index 6badd64..bdaa1b7 100644 --- a/integuru/models/DAGManager.py +++ b/integuru/models/DAGManager.py @@ -64,5 +64,3 @@ def __str__(self): attrs = self.graph.nodes[node_id] nodes_info.append(f"{node_id}: {attrs}") return "\n".join(nodes_info) - - diff --git a/main.ipynb b/main.ipynb index 41387e5..3fdea6b 100644 --- a/main.ipynb +++ b/main.ipynb @@ -101,9 +101,9 @@ ], "metadata": { "kernelspec": { - "display_name": "integration_agent", + "display_name": "integuru", "language": "python", - "name": "integration_agent" + "name": "integuru" }, "language_info": { "codemirror_mode": { diff --git a/pyproject.toml b/pyproject.toml index 57acf75..6bff9fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,6 +18,8 @@ networkx = "^3.3" matplotlib = "^3.9.2" ipykernel = "^6.29.5" +[tool.poetry.scripts] +integuru = "integuru.__main__:cli" [build-system] requires = ["poetry-core"] diff --git a/tests/__init__.py b/tests/__init__.py deleted file mode 100644 index e69de29..0000000 From 020df17e53d1668dd8733062eae4294d5b6e9472 Mon Sep 17 00:00:00 2001 From: Vishwanath Martur <64204611+vishwamartur@users.noreply.github.com> Date: Fri, 1 Nov 2024 14:09:22 +0530 Subject: [PATCH 3/5] Add note about 2FA workflow Related to #4 Add a note about the workflow required when the destination site uses 2FA. * **README.md** - Add a section explaining the workflow for sites using 2FA. - Mention that cookies/auth tokens/session tokens should be obtained after completing 2FA. * **create_har.py** - Add a comment to ensure 2FA is completed before saving cookies. --- README.md | 4 ++++ create_har.py | 1 + 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index c286de6..1f1b02a 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,10 @@ Options: --help Show this message and exit. ``` +## Note on 2FA + +When the destination site uses two-factor authentication (2FA), the workflow remains the same. Ensure that you complete the 2FA process and obtain the cookies/auth tokens/session tokens after 2FA. These tokens will be used in the workflow. + ## Demo [![Demo Video](https://img.youtube.com/vi/7OJ4w5BCpQ0/0.jpg)](https://www.youtube.com/watch?v=7OJ4w5BCpQ0) diff --git a/create_har.py b/create_har.py index 655657c..56a34f8 100644 --- a/create_har.py +++ b/create_har.py @@ -21,6 +21,7 @@ async def open_browser_and_wait(): input("Press Enter to continue and close the browser...") + # Ensure 2FA is completed before saving cookies cookies = await context.cookies() with open("cookies.json", "w") as f: From 2a4f37f018556cc01c75cb15ccfd582d5c3eaf41 Mon Sep 17 00:00:00 2001 From: Vishwanath Martur <64204611+vishwamartur@users.noreply.github.com> Date: Sat, 2 Nov 2024 11:39:21 +0530 Subject: [PATCH 4/5] Add privacy policy to README Related to #15 Add a "Privacy Policy" section to the `README.md` file. * **Data Storage**: Mention that collected data is stored locally in the `network_requests.har` and `cookies.json` files. * **LLM Usage**: State that the tool uses a cloud-based LLM (OpenAI's GPT-4o and o1-preview models). * **LLM Training**: Clarify that the LLM is not trained or improved by the usage of this tool. --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index c286de6..26931d5 100644 --- a/README.md +++ b/README.md @@ -98,3 +98,14 @@ Contributions to improve Integuru are welcome. Please feel free to submit issues Integuru is built by Integuru.ai. Besides our work on the agent, we take custom requests for new integrations or additional features for existing supported platforms. We also offer hosting and authentication services. If you have requests or want to work with us, reach out at richard@taiki.online. We open-source unofficial APIs that we've built already. You can find them [here](https://github.com/Integuru-AI/APIs-by-Integuru). + +## Privacy Policy + +### Data Storage +Collected data is stored locally in the `network_requests.har` and `cookies.json` files. + +### LLM Usage +The tool uses a cloud-based LLM (OpenAI's GPT-4o and o1-preview models). + +### LLM Training +The LLM is not trained or improved by the usage of this tool. From 6e5de83fad4921c6467e98bf3c36f0df3b2fe17e Mon Sep 17 00:00:00 2001 From: Richard Date: Mon, 4 Nov 2024 13:27:54 -0800 Subject: [PATCH 5/5] Update README.md Update --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c286de6..cab8f52 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Let's assume we want to download utility bills: ## Setup -1. Set up your OpenAI [API Keys](https://platform.openai.com/account/api-keys) and add the `OPENAI_API_KEY` environment variable. (We recommend your open ai account to have models that are at least as capable as OpenAI o1-mini. Models on par with OpenAI o1-preview are ideal.) +1. Set up your OpenAI [API Keys](https://platform.openai.com/account/api-keys) and add the `OPENAI_API_KEY` environment variable. (We recommend using an account with access to models that are at least as capable as OpenAI o1-mini. Models on par with OpenAI o1-preview are ideal.) 2. Install Python requirements via poetry: ``` poetry install