Skip to content

Commit dfc6cba

Browse files
author
colinmcneil
committed
Test background
1 parent ad0802a commit dfc6cba

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

prompts/chrome.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,33 @@ tools:
4040
image: vonwig/curl:latest
4141
command:
4242
- "{{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}}"
4360
---
4461

4562
# prompt
4663

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.
4865

4966
You have `curl` and `websocat` available to you to control the browser and to answer the user's question.
5067

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+
5170
## Verify the server is running
5271

5372
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
84103

85104
# prompt
86105

87-
{{question}}
106+
What is the url for the docker logo?

0 commit comments

Comments
 (0)