Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In this article, we will describe how to build your first module for FinanceGPT so you can run your own code against the chat.

As an example, we are going to deploy the most simple app from this repository the demo app: https://github.com/Unique-AG/sdk-deploy-template

...

Table of Contents
stylenone

Ensure a reachable Webhook endpoint (not needed in local dev setup)

To do that we need to create a connection between Unique FinanceGPT and your development environment. For this we use ngrok but you can also use any other way to get a webhook redirected to your development machine. E.g. Azure functions or other mechanisms. It is important that the data can connect from your FinanceGPT environment to your local machine somehow.

...


API_BASE is very important to do it right:

Local dev setup:

  • Base url: http://localhost:8092/public

Remote setup:

  1. no trailing / be careful

  2. public/chat (not the other way around)

  3. make sure you use the correct host! you can look it up in any graphql request on the front end like in the picture below (this is the one from the next multi-tenant):

    Screenshot 2024-05-15 at 22.54.09.png

Defining the module

Create a Module Template (Depricated this can now be done via Interface)

Now we need to make sure that you can create the module that will react to the event in a space.
For this, we need a bit of API magic for the moment.

Here is the simplest way. Copy your bearer Token from the browser illustrated in the picture below:

...

  1. Make sure you have set the correct URL: (:

    • Local dev setup, use http://localhost:8092/graphql

    • For remote setup, see the graphql request from the browser like above

    )
  2. The name here is very important. Your app will receive a payload that contains this name should it be called upon.

  3. the descriptions are also very important. Here you see that this function will only be called if asked for a demo. This is up to you to provide and also test how well it reacts to its intent.

...