brx-node
is the official interaction module for BRX.ai. It is used for interacting with BRX and includes functionalities such as sending requests and receiving responses.
We’re currently in BETA. Expect package changes and improvements in the future!
Install
Usage
Here is how you can interact with the BRX AI API using this module:BRX Client Class
The BRX Client is used for fetching the BRK Object on runtime, and BRK Execution.BRX.constructor(accessToken: string): BRX
Creates an instance of the BRX Client. Parameters:accessToken
(string
): The access token to interact with the BRX AI API.
BRX.get(BRK_ID: string)
- query: (
BRK
): The BRK
BRX.run(query: BRK)
- query: (
BRK
): The BRK
BRK Class
A BRK is a prompt with an ability to include variables, and other BRKs as dependencies with recursion.BRK.constructor(BRKSchema: GetSchemaObject): BRK
Creates an instance of the BRK. Parameters:BRKSchema
(GetSchemaObject
): The schema for the BRK. you can fetch this schema using BRX.get(’BRK-ID’)