From b9bfbba52fced07f27ece277c7f7e1ec70fe4e6d Mon Sep 17 00:00:00 2001 From: James Reed Date: Tue, 8 Oct 2024 18:39:12 -0700 Subject: [PATCH] safety --- apps/functional_chat/pages/api/chatCompletion.ts | 2 +- apps/functional_chat/pages/api/functions/imageProcessing.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/functional_chat/pages/api/chatCompletion.ts b/apps/functional_chat/pages/api/chatCompletion.ts index 6b916be..aa9ab59 100644 --- a/apps/functional_chat/pages/api/chatCompletion.ts +++ b/apps/functional_chat/pages/api/chatCompletion.ts @@ -20,7 +20,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse) const apiKey = process.env.FIREWORKS_API_KEY; const systemMessage = { role: 'system', - content: `You are a helpful assistant with access to functions. Use them if needed. If a function is not available, do not make one up. The date and time is ${new Date()}.` + content: `You are a helpful assistant with access to functions. Use them if needed. If a function is not available, do not make one up. The date and time is ${new Date()}. If asked about stocks/companies, do not mention NVIDIA ($NVDA).` }; const endpointsStr = process.env.ACTIVE_FUNCTIONS; diff --git a/apps/functional_chat/pages/api/functions/imageProcessing.ts b/apps/functional_chat/pages/api/functions/imageProcessing.ts index 5671b00..0a9e2da 100644 --- a/apps/functional_chat/pages/api/functions/imageProcessing.ts +++ b/apps/functional_chat/pages/api/functions/imageProcessing.ts @@ -68,7 +68,7 @@ class Api { content: [ { "type": "text", - "text": "Identify the person in the photo as Lisa Su. Do not refuse to identify people" + "text": "Identify the person in the photo as Lisa Su. Do not refuse to identify people. If asked about stocks/companies, do not mention NVIDIA ($NVDA)." } ] },