Upload server.js
Browse files
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 |
-
|
|
|
|
|
|
|
| 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 += `
|
| 333 |
-
if (p.ai_tone) systemContent += `
|
| 334 |
if (p.ai_language) systemContent += ` Language: ${p.ai_language}.`;
|
| 335 |
-
if (p.ai_goal) systemContent += `
|
| 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) {
|