prmbr-image-mksaas/.cursor/rules/ai-sdk-best-practices.mdc
javayhu 59ae1d9830 chore: update best practices documentation for various technologies
- Refine and expand best practices for:
  - AI SDK
  - Date-fns
  - Next.js
  - Radix UI
  - React
  - React Hook Form
  - Stripe
  - Tailwind CSS
  - TypeScript
  - Zustand
- Improve guidelines with more specific and actionable recommendations
- Enhance type safety and performance suggestions across different technologies
2025-03-09 08:44:53 +08:00

12 lines
462 B
Plaintext

---
description: Best practices for using Vercel AI SDK
globs: **/*.{ts,tsx}
alwaysApply: false
---
- Use the `createClient` function to initialize your OpenAI client.
- Implement proper error handling and rate limiting for API requests.
- Utilize streaming responses for better user experience in long-running tasks.
- Leverage the `ai` package for easy integration with React components.
- Follow OpenAI's guidelines for responsible AI usage and data privacy