...
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)
...
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.
...
And make sure you have set the correct Bearer token like in the example below, which is the token copied from above.
Note |
---|
There is no Bearer in front and no carriage return at the end! |
...
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
}
}
|
Use the Module in a space
Now if you go into the spaces you can choose this as a module so:
...