@railtownai/browser
v2.0.22
Published
@railtownai/browser is a library that provides browser integrations with Railtown AI
Downloads
186
Keywords
Readme
Railtown AI JavaScript Browser Integration
This package provides a JavaScript API for interacting with Railtown AI from a web browser.
Getting Started
- Sign up on Railtown AI and create a new project.
- Copy your Railtown API Key from the project configuration page.
- Use the following code snippet in your
<head>
:
<!-- Railtown -->
<script src="https://railtownazureb2c.blob.core.windows.net/cdn/railtown.min-latest.js"></script>
<script>
window.RailtownAI && RailtownAI.install("YOUR_RAILTOWN_TOKEN");
</script>
Configuration
The install
function takes an optional configuration object as a second argument. The following options are available:
ignoreErrors
Specify a list of error messages to ignore. This is useful for ignoring errors that are not actionable, such as network errors. The default value is []
.
RailtownAI.install("YOUR_RAILTOWN_TOKEN", {
ignoreErrors: ["Network Error", /Exact Message/],
});