...
Table of Contents | ||
---|---|---|
|
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.
...
Now login to Unique and go to the app registration. This requires admin rights to do so.
...
Create a new app
...
...
Activate the app
...
Add an endpoint
Make sure you know the URL that your machine is exposing, here it is the ngrok URL but it is webhook because the demo application exposes that.In development
was chosen so the webhook does not expire on too many errors 😃
...
API_BASE
is very important to do it right:
Local dev setup:
Base url:
http://localhost:8092/public
Remote setup:
no trailing / be careful
public/chat (not the other way around)
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):
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:
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
The name here is very important. Your app will receive a payload that contains this name should it be called upon.
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 } } |
...