v1.10.3
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
- ai-sdk: CreateTool, implementTool helpers - by @dinwwwh in https://github.com/middleapi/orpc/issues/1151 (d92c7)
🐞 Bug Fixes
- zod: Union and intersection schema conversion - by @dinwwwh in https://github.com/middleapi/orpc/issues/1157 (b1b99)