chatbot-template/lib/ai/entitlements.ts

30 lines
658 B
TypeScript
Raw Normal View History

import type { UserType } from '@/app/(auth)/auth';
import type { ChatModel } from './models';
2025-04-25 23:40:15 -07:00
interface Entitlements {
2025-04-25 23:40:15 -07:00
maxMessagesPerDay: number;
availableChatModelIds: Array<ChatModel['id']>;
}
2025-04-25 23:40:15 -07:00
export const entitlementsByUserType: Record<UserType, Entitlements> = {
/*
* For users without an account
*/
guest: {
maxMessagesPerDay: 20,
availableChatModelIds: ['chat-model', 'chat-model-reasoning'],
2025-04-25 23:40:15 -07:00
},
/*
* For users with an account
*/
regular: {
maxMessagesPerDay: 100,
availableChatModelIds: ['chat-model', 'chat-model-reasoning'],
2025-04-25 23:40:15 -07:00
},
/*
* TODO: For users with an account and a paid membership
*/
};