diff --git a/examples/multion/Webpage_data_retrieval.ipynb b/examples/multion/Webpage_data_retrieval.ipynb index 8e524308..348788c7 100644 --- a/examples/multion/Webpage_data_retrieval.ipynb +++ b/examples/multion/Webpage_data_retrieval.ipynb @@ -48,37 +48,26 @@ " api_key=os.environ.get(\"MULTION_API_KEY\"),\n", " agentops_api_key=os.environ.get(\"AGENTOPS_API_KEY\"),\n", ")\n", - "create_session_params = {\"url\": \"https://www.rei.com/\"}\n", "\n", - "create_session_response = multion.sessions.create(**create_session_params)\n", - "session_id = create_session_response.session_id\n", - "cmd = \"find the cheapest satellite phone on REI\"\n", - "print(create_session_response.message)\n", + "cmd = \"what three things do i get with agentops\"\n", + "url = \"https://www.agentops.ai/\"\n", "\n", - "retrieve_response = multion.sessions.retrieve(\n", - " session_id=session_id,\n", - " cmd=cmd,\n", - " url=\"https://www.rei.com/\",\n", - " fields=[\"price\"],\n", - " include_screenshot=True,\n", + "retrieve_response = multion.retrieve(\n", + " cmd=cmd, url=url, fields=[\"price\"], include_screenshot=True\n", ")\n", "print(retrieve_response.message)\n", "\n", "while retrieve_response.status == \"CONTINUE\":\n", - " retrieve_response = multion.sessions.retrieve(\n", - " session_id=session_id,\n", + " retrieve_response = multion.retrieve(\n", " cmd=cmd,\n", - " url=\"https://www.rei.com/\",\n", + " url=url,\n", " fields=[\"price\"],\n", " include_screenshot=True,\n", " )\n", " print(retrieve_response.message)\n", "\n", "if retrieve_response.status == \"DONE\":\n", - " print(\"task completed\")\n", - "\n", - "get_screenshot = multion.sessions.screenshot(session_id=session_id)\n", - "close_session_response = multion.sessions.close(session_id=session_id)" + " print(\"task completed\")" ] }, { @@ -115,7 +104,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.5" + "version": "3.12.3" } }, "nbformat": 4,