Quick start
Ship LLM-powered features into production
Getting started with Relevance AI is easy. You can get started in under 5 minutes using our SDK.
1. Install Relevance and authenticate
To get started, install our Javascript SDK and CLI. You can do this using npm
:
The second command will redirect you to your browser, where you can sign up or log in. Follow the instructions to enter your region, project and API key into the CLI to authenticate.
2. Set up integrations
To take advantage of LLMs, you’ll need to configure integrations such as Open AI and Cohere. You can do this on the same page you got your API key from, or to re-open that page:
3. Create a sample chain
Create a /chains
folder in your project and create a file called hello-world.ts
with the following contents:
To deploy this chain, run:
This will output a preview URL to view the chain online in the Notebook or an ID that can be used to run the chain with the SDK.
4. Use the SDK to run the chain
In your application, you can now call the chain using the SDK!
If you are running server side, simply:
Or, on the client side, you can run the chain without exposing internals - as long as you set publiclyTriggerable: true
in defineChain
.
Was this page helpful?