import { generateText, tool } from "ai";import { z } from "zod";const { text } = await generateText({ model: adaptive(), prompt: "What's the weather in New York?", tools: { getWeather: tool({ description: "Get weather for a location", parameters: z.object({ location: z.string(), }), execute: async ({ location }) => { return `Weather in ${location} is sunny and 72°F`; }, }), },});