https://www.boundaryml.com logo
🟡 Using BAML for Websearch and Google Maps API
# questions
s
Hello , I have playing around with websearch tools and new google maps api with BAML . I have been defining clients for each of these tools with a fixed parameter. Is there a way to programmatically do this after the BAML client is generated so that I don't have use fixed parameters ? Also ,I understand for external tool calls , BAML helps generate the structured output which can be used for tools calls but is there any benefit to using BAML when I am using an internal tool using api like in the above examples ? Thanks https://cdn.discordapp.com/attachments/1253172394345107466/1430135254244655164/image.png?ex=68f8acbf&is=68f75b3f&hm=2d5442734cbe8139dc2fafae54413c0e7b11272d3c84c04fd6cca5dfdc461ca8& https://cdn.discordapp.com/attachments/1253172394345107466/1430135254470889562/image.png?ex=68f8acbf&is=68f75b3f&hm=80f897b3f8e6ab098da2635414097bfc811fa7d341995866f1084f9a944865a3&
w
Yes, you can use a client registry https://docs.boundaryml.com/ref/baml_client/client-registry to dynamically pick between multiple clients at runtime
Honestly though it's probably easier and more reliable to have a function in your own code that does the google maps api call, and then return a baml response with parameters for you to manage calling that function, rather than use the LLM's native tool calling functionality
s
thanks ! will run quick check if it makes a difference between direct api call vs LLM native tool call .