github unnoq/orpc v1.10.3

one day ago

AI SDK implementTool & createTool helpers

Implement/Convert a procedure/contract -> AI SDK Tool

const getWeatherTool = implementTool(getWeatherContract, {
  execute: async ({ location }) => ({
    location,
    temperature: 72 + Math.floor(Math.random() * 21) - 10,
  }),
})

const getWeatherTool = createTool(getWeatherProcedure, {
  context: {}, // provide initial context if needed
})

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

Don't miss a new orpc release

NewReleases is sending notifications on new releases.