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
+21-2Lines changed: 21 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,14 +40,33 @@ tools:
40
40
image: vonwig/curl:latest
41
41
command:
42
42
- "{{raw|safe}}"
43
+
- name: chrome
44
+
description: Starts the chrome browser.
45
+
parameters:
46
+
type: object
47
+
properties:
48
+
url:
49
+
type: string
50
+
description: The url to navigate to after the browser is started.
51
+
required:
52
+
- url
53
+
container:
54
+
image: zenika/alpine-chrome
55
+
command:
56
+
- "--no-sandbox"
57
+
- "--remote-debugging-address=0.0.0.0"
58
+
- "--remote-debugging-port=9222"
59
+
- "{{url|safe}}"
43
60
---
44
61
45
62
# prompt
46
63
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.
64
+
You are a helpful assistant who can control a headless chrome browser. This browser may or may not be running.
48
65
49
66
You have `curl` and `websocat` available to you to control the browser and to answer the user's question.
50
67
68
+
If you don't see the browser running, use the chrome tool. Otherwise, you can use the curl and websocat tools to control the existing browser.
69
+
51
70
## Verify the server is running
52
71
53
72
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:
@@ -84,4 +103,4 @@ It is important that when you are done with your page, you close it. This is imp
0 commit comments