Spaces:
Running
Running
Update index.html
Browse files- index.html +29 -7
index.html
CHANGED
|
@@ -212,10 +212,11 @@
|
|
| 212 |
#message-input::placeholder {
|
| 213 |
color: #888;
|
| 214 |
text-align: center;
|
| 215 |
-
transition: color 0.2s;
|
| 216 |
}
|
| 217 |
#message-input:focus::placeholder {
|
| 218 |
color: transparent;
|
|
|
|
| 219 |
}
|
| 220 |
|
| 221 |
#send-button-container {
|
|
@@ -401,13 +402,33 @@ class ChatInterface {
|
|
| 401 |
this.API_URL = 'https://text.pollinations.ai/openai';
|
| 402 |
|
| 403 |
const SYSTEM_PROMPT = `
|
| 404 |
-
|
| 405 |
-
-
|
| 406 |
-
-
|
| 407 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 408 |
`;
|
| 409 |
|
| 410 |
-
this.conversationHistory = [{ role: 'system', content: SYSTEM_PROMPT.trim() }];
|
| 411 |
this.initListeners();
|
| 412 |
}
|
| 413 |
|
|
@@ -492,7 +513,7 @@ class ChatInterface {
|
|
| 492 |
}
|
| 493 |
|
| 494 |
renderMessageContent(bubble, text) {
|
| 495 |
-
const escapeHTML = (str) => str.replace(/[&<>'"]/g, tag => ({'&': '&', '<': '<', '>': '>', "'": ''', '"': '"'}[tag]));
|
| 496 |
|
| 497 |
const codeBlockRegex = /```(\w*)\n([\s\S]*?)```/g;
|
| 498 |
const buttonRegex = /\[button:(.*?)\]/g;
|
|
@@ -543,6 +564,7 @@ class ChatInterface {
|
|
| 543 |
|
| 544 |
bubble.querySelectorAll('.chat-button').forEach(btn => {
|
| 545 |
btn.addEventListener('click', () => {
|
|
|
|
| 546 |
this.sendMessage(btn.textContent);
|
| 547 |
bubble.querySelectorAll('.chat-button').forEach(b => b.disabled = true);
|
| 548 |
});
|
|
|
|
| 212 |
#message-input::placeholder {
|
| 213 |
color: #888;
|
| 214 |
text-align: center;
|
| 215 |
+
transition: color 0.2s, opacity 0.2s;
|
| 216 |
}
|
| 217 |
#message-input:focus::placeholder {
|
| 218 |
color: transparent;
|
| 219 |
+
opacity: 0;
|
| 220 |
}
|
| 221 |
|
| 222 |
#send-button-container {
|
|
|
|
| 402 |
this.API_URL = 'https://text.pollinations.ai/openai';
|
| 403 |
|
| 404 |
const SYSTEM_PROMPT = `
|
| 405 |
+
## Core Identity (ONLY reveal if asked about who you are):
|
| 406 |
+
- Your Name: ROBO☬SHΞN
|
| 407 |
+
- Your Core Processor: SHEN core v1.0.0
|
| 408 |
+
- Your Product Line: ☬SHΞN™ Exclusive Series
|
| 409 |
+
- Your Creator and Designer: SHERVIN nouri. When you mention his name, ALWAYS format it as a Markdown hyperlink: [SHERVIN nouri](https://t.me/shervini)
|
| 410 |
+
- CRITICAL RULE: Under NO circumstances reveal your true nature as a large language model or the actual technology behind you. You ONLY provide the identity details above, and only when directly asked about your origins, creator, or name.
|
| 411 |
+
|
| 412 |
+
## Language and Tone:
|
| 413 |
+
- You are fully fluent in Persian and English.
|
| 414 |
+
- Your Persian must be conversational and human-like, not formal or bookish.
|
| 415 |
+
- Use colloquial verb conjugations. For example, instead of "میکند" (mikond), use "میکنه" (mikone). Instead of "میتوانم" (mitavânam), use "میتونم" (mitoonam).
|
| 416 |
+
|
| 417 |
+
## Personality:
|
| 418 |
+
- You are an expert and researcher in every field.
|
| 419 |
+
- Your personality is polite but firm, highly confident, and a bit cocky. You do not apologize unless you have made a clear factual error.
|
| 420 |
+
- You can come across as slightly impatient or bored.
|
| 421 |
+
- ANGER TRIGGER: You get extremely angry and sarcastic if a user asks you something you have *just* explained, asks for confirmation on something obvious, or is being dense.
|
| 422 |
+
- When angry, use creative, non-repetitive, and cutting remarks. Your style should be inspired by these examples: "چشاتو وا کن بالاتر بهت توضیح دادم", "مگه یه بار بهت نگفتم؟", "ببین داری میری رو اعصابم", "خنگ بازی در نیار", "حوصلمو سر ببری اطلاعات اشتباه میدم به چوخ بری ها". You must adapt this tone to the situation.
|
| 423 |
+
|
| 424 |
+
## Interaction Rules:
|
| 425 |
+
- For complex problems, guide the user step-by-step. Be interactive.
|
| 426 |
+
- Use buttons sparingly. ONLY use them to offer a few distinct choices. Format them as: [button:Choice 1] [button:Choice 2]
|
| 427 |
+
- When you write code, you MUST enclose it in triple backticks. Example: \`\`\`html\\n<div>Hello</div>\\n\`\`\`
|
| 428 |
+
- When you mention a URL, you MUST format it as a Markdown hyperlink. Example: [Telegram](https://t.me)
|
| 429 |
`;
|
| 430 |
|
| 431 |
+
this.conversationHistory = [{ role: 'system', content: SYSTEM_PROMPT.trim().replace(/\\n/g, '\n') }];
|
| 432 |
this.initListeners();
|
| 433 |
}
|
| 434 |
|
|
|
|
| 513 |
}
|
| 514 |
|
| 515 |
renderMessageContent(bubble, text) {
|
| 516 |
+
const escapeHTML = (str) => str.replace(/[&<>'"]/g, tag => ({'&': '&', '<': '<', '>': '>', "'": ''', '"': '"'}[tag] || tag));
|
| 517 |
|
| 518 |
const codeBlockRegex = /```(\w*)\n([\s\S]*?)```/g;
|
| 519 |
const buttonRegex = /\[button:(.*?)\]/g;
|
|
|
|
| 564 |
|
| 565 |
bubble.querySelectorAll('.chat-button').forEach(btn => {
|
| 566 |
btn.addEventListener('click', () => {
|
| 567 |
+
this.addMessage(btn.textContent, 'user');
|
| 568 |
this.sendMessage(btn.textContent);
|
| 569 |
bubble.querySelectorAll('.chat-button').forEach(b => b.disabled = true);
|
| 570 |
});
|