SDK examples
Run a prompt with tools
Learn how to run a prompt with tools using the Latitude SDK
Prompt
In this example, we define a tool to get the weather. How you obtain the weather is up to you—you might call a third-party service or something within your own system. Once you have the weather information, you return the response to the LLM, and it finishes processing the prompt with that data. You can read more about tool calling here.
Code
When calling a tool, you can process the data using the arguments your users provide and return a response.