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

...

  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:

...

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
    }
}

...