Versions Compared

Key

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

...

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 in the UI

Use the “AI Module Templates” section in the Unique solution’s frontend to create a custom module template for your SDK module. Documentation on this can be found here: https://unique-ch.atlassian.net/wiki/spaces/PUB/pages/586186776/AI+Module+Templates#Creating-an-AI-Module-Template.

Create a Module Template via API (Deprecated)

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:

...

Run the GraphQL via Postman

Now you will need to execute a graphql request like this one for example in Postman:

  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.

...

Here is the mutation as text:

Code Block
mutation CreateModuleTemplate {
    createModuleTemplate(
        input: {
            configuration: { languageModel: "AZURE_GPT_35_TURBO_16K" }
            isExternal: true
            name: "DemoApp"
            templateName: "Demo App Template Name"
            toolDefinition: {
                type: "function"
                function: {
                    name: "DemoApp"
                    parameters: {
                        type: "object"
                        properties: {
                            instruction: {
                                type: "string"
                                description: "The instruction given by the employee e.g., 'Demo my App please' or 'Tell me about the demo'."
                            }
                        }
                    }
                    description: "This function is specifically designed for demos"
                }
            }
            weight: 5500
        }
    ) {
        templateName
        companyId
    }
}

...