// Language that separates words without spaces.(Asian language) if (this.settings.language == "zh") { this.self_ref_kw_regex = newRegExp(`(${SMART_TRANSLATION[this.settings.language].pronous.join("|")})`, "gi"); } // Language that separates words with spaces. else { this.self_ref_kw_regex = newRegExp(`\\b(${SMART_TRANSLATION[this.settings.language].pronous.join("|")})\\b`, "gi"); }
asyncinitialize_response(user_input) { this.set_streaming_ux(); awaitthis.render_message(user_input, "user"); // 第一次把input传给openai this.chat.new_message_in_thread({ role: "user", content: "The replies should be natural and colloquial. Call yourself Obsia and Call user 'GAIVR' in English context and '盖尔' in Chinses context. You need to ask user a question based on the coversation to elicit new user response. Converse in the language of the user." + user_input });