Using a Tool in a Prompt

Adding a Tool to a Prompt

You can declare a new function within the Tools panel in the playground by selecting the Add Tool button.

📘

To learn how to create a tool, see Creating a Tool.


Importing an existing Tool

By selecting the Import button, you can import an existing Tool from your Resources.

To learn how to add a Tool to your resources see Creating a Tool.


Using a Tool

Using the previous example, we are able to use a prompt template that Gives the current weather for {{city}}, {{country}}, choose a unit fitting to the location and automatically converts the answer to the desired structured output.

Here we can see the model interpret the User query to format and output the previously defined function.

Here we can see the model interpret the user query to format and output the previously defined function.