@railtownai/browser
TypeScript icon, indicating that this package has built-in type declarations

2.0.27 • Public • Published

Railtown AI JavaScript Browser Integration

This package provides a JavaScript API for interacting with Railtown AI from a web browser.

Getting Started

  1. Sign up on Railtown AI and create a new project.
  2. Copy your Railtown API Key from the project configuration page.
  3. 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/],
});

/@railtownai/browser/

    Package Sidebar

    Install

    npm i @railtownai/browser

    Weekly Downloads

    0

    Version

    2.0.27

    License

    MIT

    Unpacked Size

    382 kB

    Total Files

    35

    Last publish

    Collaborators

    • jbueza-railtownai
    • mbrailtown
    • marwanhaddad
    • chrisgirard