-
Notifications
You must be signed in to change notification settings - Fork 413
Expand file tree
/
Copy pathai.mdc
More file actions
15 lines (15 loc) · 736 Bytes
/
Copy pathai.mdc
File metadata and controls
15 lines (15 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
---
description: AI, deepseek, openai, claude, llm
globs:
alwaysApply: false
---
AI SDK
- Use the Vercel AI SDK UI for implementing streaming chat UI.
- Use the Vercel AI SDK Core to interact with language models.
- Use the Vercel AI SDK RSC and Stream Helpers to stream and help with the generations.
- Implement proper error handling for AI responses and model switching.
- Implement fallback mechanisms for when an AI model is unavailable.
- Handle rate limiting and quota exceeded scenarios gracefully.
- Provide clear error messages to users when AI interactions fail.
- Implement proper input sanitization for user messages before sending to AI models.
- Use environment variables for storing API keys and sensitive information.