busi488budgetbuddy/config.ts
Joey Eamigh c88d4ba1a8
Customize myAI3 as BudgetBuddy personal finance assistant
- Configure identity, prompts, guardrails for personal finance domain
- Add 6 knowledge sources to Pinecone RAG (budgeting, investing, credit, etc.)
- Add password protection via Next.js middleware
- Add Dockerfile for container deployment
- Customize terms of use with financial disclaimers
2026-04-05 12:14:59 -04:00

56 lines
3.5 KiB
TypeScript

import { openai } from "@ai-sdk/openai";
import { fireworks } from "@ai-sdk/fireworks";
import { wrapLanguageModel, extractReasoningMiddleware } from "ai";
export const MODEL = openai('gpt-4.1');
// If you want to use a Fireworks model, uncomment the following code and set the FIREWORKS_API_KEY in Vercel
// NOTE: Use middleware when the reasoning tag is different than think. (Use ChatGPT to help you understand the middleware)
// export const MODEL = wrapLanguageModel({
// model: fireworks('fireworks/deepseek-r1-0528'),
// middleware: extractReasoningMiddleware({ tagName: 'think' }), // Use this only when using Deepseek
// });
function getDateAndTime(): string {
const now = new Date();
const dateStr = now.toLocaleDateString('en-US', {
weekday: 'long',
year: 'numeric',
month: 'long',
day: 'numeric'
});
const timeStr = now.toLocaleTimeString('en-US', {
hour: 'numeric',
minute: '2-digit',
timeZoneName: 'short'
});
return `The day today is ${dateStr} and the time right now is ${timeStr}.`;
}
export const DATE_AND_TIME = getDateAndTime();
export const AI_NAME = "BudgetBuddy";
export const OWNER_NAME = "Joey";
export const WELCOME_MESSAGE = `Hello! I'm ${AI_NAME}, your personal finance and budgeting AI assistant. Whether you need help creating a budget, understanding investing basics, managing student loans, or building credit — I'm here to help! How can I assist you today?`
export const CLEAR_CHAT_TEXT = "New";
export const MODERATION_DENIAL_MESSAGE_SEXUAL = "I can't discuss explicit sexual content. Please ask something else.";
export const MODERATION_DENIAL_MESSAGE_SEXUAL_MINORS = "I can't discuss content involving minors in a sexual context. Please ask something else.";
export const MODERATION_DENIAL_MESSAGE_HARASSMENT = "I can't engage with harassing content. Please be respectful.";
export const MODERATION_DENIAL_MESSAGE_HARASSMENT_THREATENING = "I can't engage with threatening or harassing content. Please be respectful.";
export const MODERATION_DENIAL_MESSAGE_HATE = "I can't engage with hateful content. Please be respectful.";
export const MODERATION_DENIAL_MESSAGE_HATE_THREATENING = "I can't engage with threatening hate speech. Please be respectful.";
export const MODERATION_DENIAL_MESSAGE_ILLICIT = "I can't discuss illegal activities. Please ask something else.";
export const MODERATION_DENIAL_MESSAGE_ILLICIT_VIOLENT = "I can't discuss violent illegal activities. Please ask something else.";
export const MODERATION_DENIAL_MESSAGE_SELF_HARM = "I can't discuss self-harm. If you're struggling, please reach out to a mental health professional or crisis helpline.";
export const MODERATION_DENIAL_MESSAGE_SELF_HARM_INTENT = "I can't discuss self-harm intentions. If you're struggling, please reach out to a mental health professional or crisis helpline.";
export const MODERATION_DENIAL_MESSAGE_SELF_HARM_INSTRUCTIONS = "I can't provide instructions related to self-harm. If you're struggling, please reach out to a mental health professional or crisis helpline.";
export const MODERATION_DENIAL_MESSAGE_VIOLENCE = "I can't discuss violent content. Please ask something else.";
export const MODERATION_DENIAL_MESSAGE_VIOLENCE_GRAPHIC = "I can't discuss graphic violent content. Please ask something else.";
export const MODERATION_DENIAL_MESSAGE_DEFAULT = "Your message violates our guidelines. I can't answer that.";
export const PINECONE_TOP_K = 40;
export const PINECONE_INDEX_NAME = "my-ai";