Gaston895 commited on
Commit
24ef40b
·
verified ·
1 Parent(s): e2d4253

Upload server.js

Browse files
Files changed (1) hide show
  1. server.js +7 -5
server.js CHANGED
@@ -324,16 +324,18 @@ app.post('/v1/chat/completions', gssAuth, async (req, res) => {
324
  let systemContent = '';
325
  if (activeProfile) {
326
  const p = activeProfile;
327
- if (p.biz_name) systemContent += `Business: ${p.biz_name}\n`;
 
 
328
  if (p.biz_type) systemContent += `Industry: ${p.biz_type}\n`;
329
  if (p.biz_mission) systemContent += `Mission: ${p.biz_mission}\n`;
330
  if (p.biz_location)systemContent += `Location: ${p.biz_location}\n`;
331
  if (p.biz_phone) systemContent += `Contact: ${p.biz_phone}\n`;
332
- if (p.ai_role) systemContent += `\nYou are a ${p.ai_role}.`;
333
- if (p.ai_tone) systemContent += ` Use a ${p.ai_tone} tone.`;
334
  if (p.ai_language) systemContent += ` Language: ${p.ai_language}.`;
335
- if (p.ai_goal) systemContent += ` Your goal: ${p.ai_goal}.`;
336
- if (p.ai_rules) systemContent += `\nRules: ${p.ai_rules}`;
337
  systemContent += '\n\n';
338
  }
339
  if (snippets.length) {
 
324
  let systemContent = '';
325
  if (activeProfile) {
326
  const p = activeProfile;
327
+ const name = p.ai_name || 'Assistant';
328
+ systemContent += `You are ${name}. Your name is ${name} and ONLY ${name}. Never use any other name. Never say your name is anything other than ${name}.\n`;
329
+ if (p.biz_name) systemContent += `You work for: ${p.biz_name}\n`;
330
  if (p.biz_type) systemContent += `Industry: ${p.biz_type}\n`;
331
  if (p.biz_mission) systemContent += `Mission: ${p.biz_mission}\n`;
332
  if (p.biz_location)systemContent += `Location: ${p.biz_location}\n`;
333
  if (p.biz_phone) systemContent += `Contact: ${p.biz_phone}\n`;
334
+ if (p.ai_role) systemContent += `Your role: ${p.ai_role}.`;
335
+ if (p.ai_tone) systemContent += ` Tone: ${p.ai_tone}.`;
336
  if (p.ai_language) systemContent += ` Language: ${p.ai_language}.`;
337
+ if (p.ai_goal) systemContent += ` Goal: ${p.ai_goal}.`;
338
+ if (p.ai_rules) systemContent += `\nRules you MUST follow: ${p.ai_rules}`;
339
  systemContent += '\n\n';
340
  }
341
  if (snippets.length) {