|
899 | 899 | <script> |
900 | 900 | // Configuration |
901 | 901 | const API_KEY = "AIzaSyD_9fPQ50G7yjIqeKUrWnVdH_Yk9m9m6SI"; |
902 | | - const AI_ENDPOINT = "https://generativelanguage.googleapis.com/v1beta/models/gemma-3-27b-it:generateContent"; |
| 902 | + const AI_ENDPOINT = "https://generativelanguage.googleapis.com/v1beta/models/gemma-3-12b-it:generateContent"; |
903 | 903 |
|
904 | 904 | // DUCKDUCKGO + WIKIPEDIA YANG WORKING |
905 | 905 | const SEARCH_ENGINES = [ |
|
918 | 918 | const AzuraSecurity = { |
919 | 919 | // Security Configuration - SIMPLE VERSION |
920 | 920 | config: { |
921 | | - MAX_INPUT_LENGTH: 10000, // Maximum characters sahaja |
922 | | - MAX_LINES: 500, // Maximum lines |
| 921 | + MAX_INPUT_LENGTH: 50, // Maximum characters sahaja |
| 922 | + MAX_LINES: 10, // Maximum lines |
923 | 923 | ALLOWED_CHARS_REGEX: /^[\w\s\p{P}\p{S}\n\r@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~`±§·°–—©®™•¶§£€¥]+$/u, |
924 | 924 |
|
925 | 925 | // Banned patterns untuk XSS protection |
@@ -1143,14 +1143,14 @@ <h6> |
1143 | 1143 | if (!text) return ''; |
1144 | 1144 |
|
1145 | 1145 | // Limit length untuk performance |
1146 | | - if (text.length > 15000) { |
1147 | | - text = text.substring(0, 15000) + '\n\n[Output dipotong untuk performance]'; |
| 1146 | + if (text.length > 50) { |
| 1147 | + text = text.substring(0, 50) + '\n\n[Output dipotong untuk performance]'; |
1148 | 1148 | } |
1149 | 1149 |
|
1150 | 1150 | // Limit lines |
1151 | 1151 | const lines = text.split('\n'); |
1152 | | - if (lines.length > 600) { |
1153 | | - text = lines.slice(0, 600).join('\n') + '\n\n[Output dipotong untuk performance]'; |
| 1152 | + if (lines.length > 10) { |
| 1153 | + text = lines.slice(0, 10).join('\n') + '\n\n[Output dipotong untuk performance]'; |
1154 | 1154 | } |
1155 | 1155 |
|
1156 | 1156 | // Basic HTML escaping untuk safety display |
|
0 commit comments