Skip to main content

What is extract()?

await cuehand.extract("get the model details")
This will return a huge chunk of text that includes information about the model. But, we can use a schema to only extract the information we need:
await cuehand.extract("get the model details",
  z.object({
    model: z.string().describe("the exact model name"),
    description: z.string().describe("the model description"),
    download: z.number().describe("the number of downloads"),
  })
);