Spaces:
Runtime error
Runtime error
Update custom.py
Browse files11 unmodified lines1213141516171889 unmodified lines10810911011111211311412 unmodified lines12712812913013113213313413513613713813914033 unmodified lines17417517617717811 unmodified lines"""# 内容背景user_background_color = ''gpt_background_color = 'rgba(225, 231, 235, 0.5)'# 模型初始设置model = "gpt-3.5-turbo"initial_content_history = [{"role": 'system',89 unmodified linestextinput.focus();} else {tabs[0].click();const waitMs = 1;function waitForFocus() {if (window.parent.document.activeElement === textinput) {12 unmodified linesevent.preventDefault();}});textinput.addEventListener('focusin', function(event) {event.stopPropagation();textarea.style.borderColor = 'rgb(255,196,35)';});textinput.addEventListener('focusout', function(event) {event.stopPropagation();textarea.style.borderColor = 'white';});// Ctrl + Enter快捷方式window.parent.document.addEventListener("keydown", event => {33 unmodified lineswaitForLayout();});});</script>"""11 unmodified lines1213141516171889 unmodified lines10810911011111211311412 unmodified lines12712812913013113213313413513613713813914033 unmodified lines17417517617717817918018118218318418518618718818919019119219311 unmodified lines"""# 内容背景user_background_color = ''gpt_background_color = 'rgba(225, 230, 235, 0.5)'# 模型初始设置model = "gpt-3.5-turbo"initial_content_history = [{"role": 'system',89 unmodified linestextinput.focus();} else {tabs[0].click();const waitMs = 10;function waitForFocus() {if (window.parent.document.activeElement === textinput) {12 unmodified linesevent.preventDefault();}});textinput.addEventListener('focusin', function (event) {event.stopPropagation();textarea.style.borderColor = 'rgb(255,75,75)';});textinput.addEventListener('focusout', function (event) {event.stopPropagation();textarea.style.borderColor = 'white';});// Ctrl + Enter快捷方式window.parent.document.addEventListener("keydown", event => {33 unmodified lineswaitForLayout();});});// 设置 Tab 键textinput.addEventListener('keydown', function (event) {if (event.keyCode === 9) {// 阻止默认行为event.preventDefault();// 获取当前光标位置const start = this.selectionStart;const end = this.selectionEnd;// 在光标位置插入制表符this.value = this.value.substring(0, start) + '\t' + this.value.substring(end);// 将光标移动到插入的制表符之后this.selectionStart = this.selectionEnd = start + 1;}});</script>"""
custom.py+25-10