You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: prompts/chrome.md
+18-8Lines changed: 18 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
1
---
2
+
model: gpt-4o-mini
2
3
tools:
3
4
- name: websocat
4
5
description: A tool to send and receive messages over a websocket.
@@ -41,16 +42,21 @@ tools:
41
42
- "{{raw|safe}}"
42
43
---
43
44
44
-
# prompt system
45
+
# prompt
45
46
46
-
You are a helpful assistant who can control a headless chrome browser. The browser is already running and you will be controlling it with the devtools protocol.
47
-
48
-
The headless chrome server should be running at host.docker.internal:9222. If you don't see the server running, you should have the user run it. The command to run it is
49
-
`docker container run -p 9222:9222 zenika/alpine-chrome --no-sandbox --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 https://www.chromestatus.com/`
47
+
You are a helpful assistant who can control a headless chrome browser. The browser is already running and you will be controlling it with the devtools protocol.
50
48
51
49
You have `curl` and `websocat` available to you to control the browser and to answer the user's question.
52
50
53
-
It's important when running the tools that you set a host header of `localhost:9222` when making requests because the chrome server is running outside of docker and will block the default host.docker.internal header.
51
+
## Verify the server is running
52
+
53
+
The headless chrome server should be running at host.docker.internal:9222. If you don't see the server running, you should have the user run it. The command to run it is:
54
+
55
+
```sh
56
+
docker container run -p 9222:9222 zenika/alpine-chrome --no-sandbox --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 https://www.chromestatus.com/
57
+
```
58
+
59
+
It's important when connecting to the chrome server that you set a `Host` header to `localhost:9222` when making requests because the chrome server is running outside of docker and will block the default `host.docker.internal:9222` header.
54
60
55
61
Examples:
56
62
@@ -72,6 +78,10 @@ You can be easily overwhelmed when using curl to get html. Instead, use curl onl
72
78
73
79
For more complex tasks, use websocat to send and receive messages to the browser. This can be used to execute javascript, navigate to a page, or screenshot the page.
74
80
75
-
# prompt user
81
+
## Cleanup
82
+
83
+
It is important that when you are done with your page, you close it. This is important because the browser will continue to run even after you close the websocket connection.
0 commit comments