This package provides a JavaScript API for interacting with Railtown AI from a web browser.
- 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>
The install
function takes an optional configuration object as a second argument. The following options are available:
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/],
});