You can add your API key as a secret and the assistant ID as an environmental variable.
Adding a secret and environmental variable in Buildship.
After that, change the Assistant instructions and mention to use your API call. You should also rename your API call to your usecase.
Reference your API call by passing the full nameof it inside your assistant instructions.
API Call node used by AI assistant
The URL of this API is an endpoint I have set up on the backend workflows in my Bubble app.
This workflow searches in my database the ID of the replaced Pokemon and then modifies it with the response of the AI assistant
Buildship API Call ode and Bubble Backend Workflow
Using json_schema for the body of API Call
In the node "API Call - Replace Pokemon", the body value is filled by the Ai assistant indicated by the blue sparks icon.
We want the Assistant to always send the JSON schema we need inside the body, for that we will add a json_schema in our assistant. Mine looks like this:
Triggering Buildship Workflow
The last thing to do is now to make an API call to our Buildship endpoint from our application!
Setting up API call and using it as an action.
I hope you found this guide useful and I'm available for work if you need further assistance :)