UtilityTools
Overview
UtilityTools
provide a simple set of general helper functions, such as get_current_date_time
and get_user_location
.
This is the prompt:
The get_user_location
tool is particularly interesting because it utilizes the geolocation extension from Wisej.NET, enabling the browser to access the PC's location services. The implementation looks like this:
Notice that it employs the TaskCompletionSource
technique to convert a callback into a Task
. This is necessary because the browser's location services support only callbacks.
Using UtilityTools
To enable the use of UtilityTools, simply add it to a SmartHub, SmartAdapter, or SmartPrompt.
Last updated