Browser
Drive the headless browser in a browser-template sandbox.
Every method shows the same operation in each SDK; pick a language once and every tab on the site follows it.
Browser
Section titled “Browser”Browser drives the browser of a sandbox created from the browser template.
Properties
Section titled “Properties”Python exposes these as methods; see below.
TypeScript exposes these as methods; see below.
Go exposes these as methods; see below.
Ruby exposes these as methods; see below.
| Property | Type | Description |
|---|---|---|
DEFAULT_MAX_CHARS |
int |
|
PROTOCOL |
String |
|
SERVER |
String |
back()
Section titled “back()”def back(self, *, max_chars: int | None=None) -> BrowserResult| Parameter | Type | Default |
|---|---|---|
max_chars |
int | None |
None |
Returns BrowserResult
sdk/python/svm/browser.py:194back(options: SnapshotOptions = {}): Promise<BrowserResult>| Parameter | Type | Default |
|---|---|---|
options |
SnapshotOptions |
{} |
Returns Promise<BrowserResult>
sdk/typescript/src/browser.ts:157func (b *Browser) Back(ctx context.Context, o BrowserCallOptions) (BrowserResult, error)Back goes back in history.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
o |
BrowserCallOptions |
Returns (BrowserResult, error)
sdk/go/guest_browser.go:310def back(max_chars: nil)| Parameter | Type | Default |
|---|---|---|
max_chars |
nil |
sdk/ruby/lib/svm/browser.rb:81public Result back()Returns Result
sdk/java/src/main/java/dev/svm/sandbox/Browser.java:99browser_use_script()
Section titled “browser_use_script()”def browser_use_script(self, task: str, *, model: str='gpt-4o', provider: str='openai') -> strA Python program that runs the browser-use library on this sandbox’s Chromium, attached over CDP. The API key for the provider is read from the sandbox’s environment (OPENAI_API_KEY, ANTHROPIC_API_KEY).
| Parameter | Type | Default |
|---|---|---|
task |
str |
|
model |
str |
'gpt-4o' |
provider |
str |
'openai' |
Returns str
sdk/python/svm/browser.py:239browserUseScript(task: string, options: { model?: string; provider?: "openai" | "anthropic" } = {}): stringA Python program that runs the browser-use library on this sandbox’s Chromium, attached over CDP. The provider’s API key is read from the sandbox’s environment (OPENAI_API_KEY, ANTHROPIC_API_KEY). An agent that ends without an answer (no API key, the model refused, the step limit) exits non-zero with its last error instead of printing “None” as if it were the answer, as in Python.
| Parameter | Type | Default |
|---|---|---|
task |
string |
|
options |
{ model?: string; provider?: "openai" | "anthropic" } |
{} |
Returns string
sdk/typescript/src/browser.ts:205func (b *Browser) BrowserUseScript(task string, o BrowserUseOptions) (string, error)BrowserUseScript is a Python program that runs the browser-use library on this sandbox’s Chromium, attached over CDP. An agent that ends without an answer exits non-zero with its last error instead of printing “None”.
| Parameter | Type | Default |
|---|---|---|
task |
string |
|
o |
BrowserUseOptions |
Returns (string, error)
sdk/go/guest_browser.go:431def browser_use_script(task, model: "gpt-4o", provider: "openai")A Python program that runs the browser-use library on this sandbox’s Chromium, attached over CDP.
| Parameter | Type | Default |
|---|---|---|
task |
||
model |
"gpt-4o" |
|
provider |
"openai" |
sdk/ruby/lib/svm/browser.rb:124public String browserUseScript(String task, String model, String provider)A Python program that runs the browser-use library on this sandbox’s Chromium, attached over CDP.
| Parameter | Type | Default |
|---|---|---|
task |
String |
|
model |
String |
|
provider |
String |
Returns String
sdk/java/src/main/java/dev/svm/sandbox/Browser.java:154call()
Section titled “call()”def call(self, tool: str, arguments: dict[str, Any] | None=None, *, max_chars: int | None=None, timeout: float=60) -> BrowserResultCall any tool of the Playwright MCP server by name.
| Parameter | Type | Default |
|---|---|---|
tool |
str |
|
arguments |
dict[str, Any] | None |
None |
max_chars |
int | None |
None |
timeout |
float |
60 |
Returns BrowserResult
sdk/python/svm/browser.py:167async call(tool: string, args: Record<string, unknown> = {}, options: SnapshotOptions & { timeoutSeconds?: number } = {}): Promise<BrowserResult>Call any tool of the Playwright MCP server by name.
| Parameter | Type | Default |
|---|---|---|
tool |
string |
|
args |
Record<string, unknown> |
{} |
options |
SnapshotOptions & { timeoutSeconds?: number } |
{} |
Returns Promise<BrowserResult>
sdk/typescript/src/browser.ts:132func (b *Browser) Call(ctx context.Context, tool string, args map[string]any, o BrowserCallOptions) (BrowserResult, error)Call calls any tool of the Playwright MCP server by name.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
tool |
string |
|
args |
map[string]any |
|
o |
BrowserCallOptions |
Returns (BrowserResult, error)
sdk/go/guest_browser.go:267def call(tool, arguments: nil, max_chars: nil, timeout: 60)Calls any tool of the Playwright MCP server by name; arguments is its argument Hash.
| Parameter | Type | Default |
|---|---|---|
tool |
||
arguments |
nil |
|
max_chars |
nil |
|
timeout |
60 |
sdk/ruby/lib/svm/browser.rb:65public Result call(String tool, Map<String, Object> arguments, int maxChars, double timeout)public Result call(String tool, Map<String, Object> arguments)Calls any tool of the Playwright MCP server by name; maxChars 0 means the client’s default.
| Parameter | Type | Default |
|---|---|---|
tool |
String |
|
arguments |
Map<String, Object> |
|
maxChars |
int |
optional |
timeout |
double |
optional |
Returns Result
sdk/java/src/main/java/dev/svm/sandbox/Browser.java:76cdp_url()
Section titled “cdp_url()”cdp_url: strProperty (read-only).
The DevTools endpoint of the sandbox’s Chromium, on the sandbox’s loopback, for browser-use and other CDP clients.
cdpUrl: stringProperty (read-only).
The DevTools endpoint of the sandbox’s Chromium, on the sandbox’s loopback, for browser-use and other CDP clients.
Not in the Go SDK’s Browser.
cdp_urlProperty (read-only).
public String cdpUrl()The DevTools endpoint of the sandbox’s Chromium, on the sandbox’s loopback, for browser-use and other CDP clients.
Returns String
sdk/java/src/main/java/dev/svm/sandbox/Browser.java:55cdpurl()
Section titled “cdpurl()”Not in the Python SDK’s Browser.
Not in the TypeScript SDK’s Browser.
func (b *Browser) CDPURL() stringCDPURL is the DevTools endpoint of the sandbox’s Chromium, on the sandbox’s loopback, for browser-use and other CDP clients.
Returns string
sdk/go/guest_browser.go:413Not in the Ruby SDK’s Browser.
Not in the Java SDK’s Browser.
click()
Section titled “click()”def click(self, ref: str, *, element: str='', double: bool=False, max_chars: int | None=None) -> BrowserResultClick the element with this ref from the latest snapshot; element is a human-readable name Playwright records.
| Parameter | Type | Default |
|---|---|---|
ref |
str |
|
element |
str |
'' |
double |
bool |
False |
max_chars |
int | None |
None |
Returns BrowserResult
sdk/python/svm/browser.py:201click(ref: string, options: SnapshotOptions & { element?: string; double?: boolean } = {}): Promise<BrowserResult>Click the element with this ref from the latest snapshot; element is a human-readable name Playwright records.
| Parameter | Type | Default |
|---|---|---|
ref |
string |
|
options |
SnapshotOptions & { element?: string; double?: boolean } |
{} |
Returns Promise<BrowserResult>
sdk/typescript/src/browser.ts:162func (b *Browser) Click(ctx context.Context, ref, element string, double bool, o BrowserCallOptions) (BrowserResult, error)Click clicks the element with this ref from the latest snapshot; element is a human-readable name Playwright records.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
ref |
string |
|
element |
string |
|
double |
bool |
|
o |
BrowserCallOptions |
Returns (BrowserResult, error)
sdk/go/guest_browser.go:327def click(ref, element: "", double: false, max_chars: nil)Clicks the element with this ref from the latest snapshot; element is a human-readable name Playwright records.
| Parameter | Type | Default |
|---|---|---|
ref |
||
element |
"" |
|
double |
false |
|
max_chars |
nil |
sdk/ruby/lib/svm/browser.rb:87public Result click(String ref, String element, boolean doubleClick)Clicks the element with this ref from the latest snapshot; element is a human-readable name Playwright records (empty for the ref).
| Parameter | Type | Default |
|---|---|---|
ref |
String |
|
element |
String |
|
doubleClick |
boolean |
Returns Result
sdk/java/src/main/java/dev/svm/sandbox/Browser.java:110constructor()
Section titled “constructor()”Not in the Python SDK’s Browser.
constructor(private readonly sandbox: GuestSandbox, options: BrowserOptions = {})| Parameter | Type | Default |
|---|---|---|
sandbox |
GuestSandbox |
|
options |
BrowserOptions |
{} |
sdk/typescript/src/browser.ts:110Not in the Go SDK’s Browser.
Not in the Ruby SDK’s Browser.
Not in the Java SDK’s Browser.
initialize()
Section titled “initialize()”Not in the Python SDK’s Browser.
Not in the TypeScript SDK’s Browser.
Not in the Go SDK’s Browser.
def initialize(sandbox, server: SERVER, port: 50_005, max_chars: DEFAULT_MAX_CHARS)| Parameter | Type | Default |
|---|---|---|
sandbox |
||
server |
SERVER |
|
port |
50_005 |
|
max_chars |
DEFAULT_MAX_CHARS |
sdk/ruby/lib/svm/browser.rb:59Not in the Java SDK’s Browser.
navigate()
Section titled “navigate()”def navigate(self, url: str, *, max_chars: int | None=None) -> BrowserResult| Parameter | Type | Default |
|---|---|---|
url |
str |
|
max_chars |
int | None |
None |
Returns BrowserResult
sdk/python/svm/browser.py:189navigate(url: string, options: SnapshotOptions = {}): Promise<BrowserResult>| Parameter | Type | Default |
|---|---|---|
url |
string |
|
options |
SnapshotOptions |
{} |
Returns Promise<BrowserResult>
sdk/typescript/src/browser.ts:153func (b *Browser) Navigate(ctx context.Context, url string, o BrowserCallOptions) (BrowserResult, error)Navigate opens url and returns the page’s snapshot.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
url |
string |
|
o |
BrowserCallOptions |
Returns (BrowserResult, error)
sdk/go/guest_browser.go:302def navigate(url, max_chars: nil)| Parameter | Type | Default |
|---|---|---|
url |
||
max_chars |
nil |
sdk/ruby/lib/svm/browser.rb:76public Result navigate(String url)| Parameter | Type | Default |
|---|---|---|
url |
String |
Returns Result
sdk/java/src/main/java/dev/svm/sandbox/Browser.java:94press()
Section titled “press()”def press(self, key: str, *, max_chars: int | None=None) -> BrowserResult| Parameter | Type | Default |
|---|---|---|
key |
str |
|
max_chars |
int | None |
None |
Returns BrowserResult
sdk/python/svm/browser.py:220press(key: string, options: SnapshotOptions = {}): Promise<BrowserResult>| Parameter | Type | Default |
|---|---|---|
key |
string |
|
options |
SnapshotOptions |
{} |
Returns Promise<BrowserResult>
sdk/typescript/src/browser.ts:182func (b *Browser) Press(ctx context.Context, key string, o BrowserCallOptions) (BrowserResult, error)Press presses a keyboard key.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
key |
string |
|
o |
BrowserCallOptions |
Returns (BrowserResult, error)
sdk/go/guest_browser.go:368def press(key, max_chars: nil)| Parameter | Type | Default |
|---|---|---|
key |
||
max_chars |
nil |
sdk/ruby/lib/svm/browser.rb:106public Result press(String key)| Parameter | Type | Default |
|---|---|---|
key |
String |
Returns Result
sdk/java/src/main/java/dev/svm/sandbox/Browser.java:132screenshot()
Section titled “screenshot()”def screenshot(self, *, full_page: bool=False) -> bytesA PNG of the page, only when asked: this costs an image’s worth of tokens where a snapshot costs a few hundred.
| Parameter | Type | Default |
|---|---|---|
full_page |
bool |
False |
Returns bytes
Raises BrowserError
sdk/python/svm/browser.py:229async screenshot(options: { fullPage?: boolean } = {}): Promise<Uint8Array>A PNG of the page, only when asked: this costs an image’s worth of tokens where a snapshot costs a few hundred.
| Parameter | Type | Default |
|---|---|---|
options |
{ fullPage?: boolean } |
{} |
Returns Promise<Uint8Array>
Raises BrowserError
sdk/typescript/src/browser.ts:194func (b *Browser) Screenshot(ctx context.Context, fullPage bool) ([]byte, error)Screenshot is a PNG of the page, only when asked: this costs an image’s worth of tokens where a snapshot costs a few hundred.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
fullPage |
bool |
Returns ([]byte, error)
sdk/go/guest_browser.go:397def screenshot(full_page: false)A PNG of the page, only when asked: this costs an image’s worth of tokens where a snapshot costs a few hundred.
| Parameter | Type | Default |
|---|---|---|
full_page |
false |
Raises BrowserError
sdk/ruby/lib/svm/browser.rb:115public byte[] screenshot(boolean fullPage)A PNG of the page, only when asked: this costs an image’s worth of tokens where a snapshot costs a few hundred.
| Parameter | Type | Default |
|---|---|---|
fullPage |
boolean |
Returns byte[]
Raises BrowserException
sdk/java/src/main/java/dev/svm/sandbox/Browser.java:145select_option()
Section titled “select_option()”def select_option(self, ref: str, values: str | list[str], *, element: str='', max_chars: int | None=None) -> BrowserResultSelect values (one option or several, by value or label) in the dropdown with this ref from the latest snapshot; element is a human-readable name Playwright records, as for click.
| Parameter | Type | Default |
|---|---|---|
ref |
str |
|
values |
str | list[str] |
|
element |
str |
'' |
max_chars |
int | None |
None |
Returns BrowserResult
sdk/python/svm/browser.py:211selectOption(ref: string, values: string | readonly string[], options: SnapshotOptions & { element?: string } = {}): Promise<BrowserResult>Select values (one option or several, by value or label) in the dropdown with this ref from the latest snapshot; element is a human-readable name Playwright records, as for click.
| Parameter | Type | Default |
|---|---|---|
ref |
string |
|
values |
string | readonly string[] |
|
options |
SnapshotOptions & { element?: string } |
{} |
Returns Promise<BrowserResult>
sdk/typescript/src/browser.ts:176func (b *Browser) SelectOption(ctx context.Context, ref string, values []string, element string, o BrowserCallOptions) (BrowserResult, error)SelectOption selects values (one option or several, by value or label) in the dropdown with this ref from the latest snapshot; element is a human-readable name Playwright records (the ref when empty), as for Click.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
ref |
string |
|
values |
[]string |
|
element |
string |
|
o |
BrowserCallOptions |
Returns (BrowserResult, error)
sdk/go/guest_browser.go:354def select_option(ref, values, element: "", max_chars: nil)Selects values (one option or several, by value or label) in the dropdown with this ref from the latest snapshot; element is a human-readable name Playwright records, as for #click.
| Parameter | Type | Default |
|---|---|---|
ref |
||
values |
||
element |
"" |
|
max_chars |
nil |
sdk/ruby/lib/svm/browser.rb:99public Result selectOption(String ref, List<String> values, String element)public Result selectOption(String ref, List<String> values)Selects values (one option or several, by value or label) in the dropdown with this ref from the latest snapshot; element is a human-readable name Playwright records (null or empty for the ref), as for click.
| Parameter | Type | Default |
|---|---|---|
ref |
String |
|
values |
List<String> |
|
element |
String |
optional |
Returns Result
sdk/java/src/main/java/dev/svm/sandbox/Browser.java:124snapshot()
Section titled “snapshot()”def snapshot(self, *, max_chars: int | None=None) -> BrowserResultThe page as its accessibility tree, with a ref on every control.
| Parameter | Type | Default |
|---|---|---|
max_chars |
int | None |
None |
Returns BrowserResult
sdk/python/svm/browser.py:197snapshot(options: SnapshotOptions = {}): Promise<BrowserResult>The page as its accessibility tree, with a ref on every control.
| Parameter | Type | Default |
|---|---|---|
options |
SnapshotOptions |
{} |
Returns Promise<BrowserResult>
sdk/typescript/src/browser.ts:159func (b *Browser) Snapshot(ctx context.Context, o BrowserCallOptions) (BrowserResult, error)Snapshot is the page as its accessibility tree, with a ref on every control.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
o |
BrowserCallOptions |
Returns (BrowserResult, error)
sdk/go/guest_browser.go:315def snapshot(max_chars: nil)The page as its accessibility tree, with a ref on every control.
| Parameter | Type | Default |
|---|---|---|
max_chars |
nil |
sdk/ruby/lib/svm/browser.rb:84public Result snapshot()The page as its accessibility tree, with a ref on every control.
Returns Result
sdk/java/src/main/java/dev/svm/sandbox/Browser.java:102tools()
Section titled “tools()”def tools(self) -> list[str]Names of the tools the gateway lets the agent use (its tool rules apply).
Returns list[str]
sdk/python/svm/browser.py:180async tools(): Promise<string[]>Names of the tools the gateway lets the agent use (its tool rules apply).
Returns Promise<string[]>
sdk/typescript/src/browser.ts:148func (b *Browser) Tools(ctx context.Context) ([]string, error)Tools lists the names of the tools the gateway lets the agent use (its tool rules apply).
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
Returns ([]string, error)
sdk/go/guest_browser.go:287def toolsNames of the tools the gateway lets the agent use (its tool rules apply).
Source:sdk/ruby/lib/svm/browser.rb:72public List<String> tools()Names of the tools the gateway lets the agent use (its tool rules apply).
Returns List<String>
sdk/java/src/main/java/dev/svm/sandbox/Browser.java:87type()
Section titled “type()”def type(self, ref: str, text: str, *, element: str='', submit: bool=False, max_chars: int | None=None) -> BrowserResult| Parameter | Type | Default |
|---|---|---|
ref |
str |
|
text |
str |
|
element |
str |
'' |
submit |
bool |
False |
max_chars |
int | None |
None |
Returns BrowserResult
sdk/python/svm/browser.py:208type(ref: string, text: string, options: SnapshotOptions & { element?: string; submit?: boolean } = {}): Promise<BrowserResult>| Parameter | Type | Default |
|---|---|---|
ref |
string |
|
text |
string |
|
options |
SnapshotOptions & { element?: string; submit?: boolean } |
{} |
Returns Promise<BrowserResult>
sdk/typescript/src/browser.ts:168func (b *Browser) Type(ctx context.Context, ref, text, element string, submit bool, o BrowserCallOptions) (BrowserResult, error)Type types text into the element with this ref; submit presses Enter afterwards.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
ref |
string |
|
text |
string |
|
element |
string |
|
submit |
bool |
|
o |
BrowserCallOptions |
Returns (BrowserResult, error)
sdk/go/guest_browser.go:342def type(ref, text, element: "", submit: false, max_chars: nil)| Parameter | Type | Default |
|---|---|---|
ref |
||
text |
||
element |
"" |
|
submit |
false |
|
max_chars |
nil |
sdk/ruby/lib/svm/browser.rb:93public Result type(String ref, String text, String element, boolean submit)| Parameter | Type | Default |
|---|---|---|
ref |
String |
|
text |
String |
|
element |
String |
|
submit |
boolean |
Returns Result
sdk/java/src/main/java/dev/svm/sandbox/Browser.java:116def use(self, task: str, *, model: str='gpt-4o', provider: str='openai', timeout_seconds: int=600) -> strRun browser-use on task against the sandbox’s Chromium and return its final answer.
| Parameter | Type | Default |
|---|---|---|
task |
str |
|
model |
str |
'gpt-4o' |
provider |
str |
'openai' |
timeout_seconds |
int |
600 |
Returns str
Raises BrowserError
sdk/python/svm/browser.py:263async use(task: string, options: { model?: string; provider?: "openai" | "anthropic"; timeoutSeconds?: number } = {}): Promise<string>Run browser-use on task against the sandbox’s Chromium and return its final answer. Rejects with BrowserError when the agent ends without one (no model API key in the sandbox, say); it never resolves with “None”.
| Parameter | Type | Default |
|---|---|---|
task |
string |
|
options |
{ model?: string; provider?: "openai" | "anthropic"; timeoutSeconds?: number } |
{} |
Returns Promise<string>
Raises BrowserError
sdk/typescript/src/browser.ts:223func (b *Browser) Use(ctx context.Context, task string, o BrowserUseOptions) (string, error)Use runs browser-use on task against the sandbox’s Chromium and returns its final answer.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
task |
string |
|
o |
BrowserUseOptions |
Returns (string, error)
sdk/go/guest_browser.go:459def use(task, model: "gpt-4o", provider: "openai", timeout_seconds: 600)Runs browser-use on task against the sandbox’s Chromium and returns its final answer.
| Parameter | Type | Default |
|---|---|---|
task |
||
model |
"gpt-4o" |
|
provider |
"openai" |
|
timeout_seconds |
600 |
Raises BrowserError
sdk/ruby/lib/svm/browser.rb:136public String use(String task, String model, String provider, int timeoutSeconds)Runs browser-use on task against the sandbox’s Chromium and returns its final answer. The model’s API key is read from the sandbox’s environment (OPENAI_API_KEY or ANTHROPIC_API_KEY); without one this throws BrowserException.
| Parameter | Type | Default |
|---|---|---|
task |
String |
|
model |
String |
|
provider |
String |
|
timeoutSeconds |
int |
Returns String
Raises BrowserException
sdk/java/src/main/java/dev/svm/sandbox/Browser.java:169wait_for()
Section titled “wait_for()”def wait_for(self, *, text: str | None=None, gone: str | None=None, seconds: float | None=None, max_chars: int | None=None) -> BrowserResult| Parameter | Type | Default |
|---|---|---|
text |
str | None |
None |
gone |
str | None |
None |
seconds |
float | None |
None |
max_chars |
int | None |
None |
Returns BrowserResult
sdk/python/svm/browser.py:223waitFor(options: SnapshotOptions & { text?: string; gone?: string; seconds?: number }): Promise<BrowserResult>| Parameter | Type | Default |
|---|---|---|
options |
SnapshotOptions & { text?: string; gone?: string; seconds?: number } |
Returns Promise<BrowserResult>
sdk/typescript/src/browser.ts:184func (b *Browser) WaitFor(ctx context.Context, w BrowserWait, o BrowserCallOptions) (BrowserResult, error)WaitFor waits for text, for text to go, or for a time.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
w |
BrowserWait |
|
o |
BrowserCallOptions |
Returns (BrowserResult, error)
sdk/go/guest_browser.go:379def wait_for(text: nil, gone: nil, seconds: nil, max_chars: nil)| Parameter | Type | Default |
|---|---|---|
text |
nil |
|
gone |
nil |
|
seconds |
nil |
|
max_chars |
nil |
sdk/ruby/lib/svm/browser.rb:108public Result waitFor(String text, String gone, Double seconds)Waits for text to appear, text to go, or a number of seconds; pass null for what is not wanted.
| Parameter | Type | Default |
|---|---|---|
text |
String |
|
gone |
String |
|
seconds |
Double |
Returns Result
sdk/java/src/main/java/dev/svm/sandbox/Browser.java:135BrowserResult
Section titled “BrowserResult”text is what to show the agent (for navigate, click and type it ends with the page’s new snapshot). tokens is estimated at three characters a token, which errs high. images holds screenshots, decoded.
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
images |
list[bytes] |
|
text |
str |
|
truncated |
bool |
| Property | Type | Description |
|---|---|---|
images |
Uint8Array[] |
|
text |
string |
|
truncated |
boolean |
| Property | Type | Description |
|---|---|---|
Images |
[][]byte |
|
Text |
string |
|
Truncated |
bool |
| Property | Type | Description |
|---|---|---|
images |
||
text |
||
truncated |
Not in the Java SDK.
tokens()
Section titled “tokens()”tokens: intProperty (read-only).
tokens: numberProperty.
Tokens: intProperty.
def tokenssdk/ruby/lib/svm/browser.rb:11Not in the Java SDK.
BrowserError
Section titled “BrowserError”The browser could not do what was asked: the gateway is not serving it, or the tool reported an error.
Properties
Section titled “Properties”Python exposes these as methods; see below.
TypeScript exposes these as methods; see below.
| Property | Type | Description |
|---|---|---|
Message |
string |
Ruby exposes these as methods; see below.
Not in the Java SDK.
constructor()
Section titled “constructor()”Not in the Python SDK’s BrowserError.
constructor(message: string)| Parameter | Type | Default |
|---|---|---|
message |
string |
sdk/typescript/src/browser.ts:48Not in the Go SDK’s BrowserError.
Not in the Ruby SDK’s BrowserError.
Not in the Java SDK.
error()
Section titled “error()”Not in the Python SDK’s BrowserError.
Not in the TypeScript SDK’s BrowserError.
func (e *BrowserError) Error() stringReturns string
sdk/go/guest_browser.go:63Not in the Ruby SDK’s BrowserError.
Not in the Java SDK.