diff --git a/lang/en-US.json b/lang/en-US.json index 8ec87ab..3221efa 100644 --- a/lang/en-US.json +++ b/lang/en-US.json @@ -35,6 +35,7 @@ "delete": "Delete", "signOut": "Sign out", "webSearch": "Web Search", + "webSearchDefaultPrompt": "Web search results:\n\n{web_results}\nCurrent date: {current_date}\n\nInstructions: Using the provided web search results, write a comprehensive reply to the given query. Make sure to cite results using [[number](URL)] notation after the reference. If the provided search results refer to multiple subjects with the same name, write separate answers for each subject.\nQuery: {query}", "welcomeScreen": { "introduction1": "is an unofficial client for ChatGPT, but uses the official OpenAI API.", "introduction2": "You will need an OpenAI API Key before you can use this client.", diff --git a/lang/zh-CN.json b/lang/zh-CN.json index 648f178..d845a3a 100644 --- a/lang/zh-CN.json +++ b/lang/zh-CN.json @@ -35,6 +35,7 @@ "delete": "删除", "signOut": "退出登录", "webSearch": "网页搜索", + "webSearchDefaultPrompt": "网络搜索结果:\n\n{web_results}\n当前日期:{current_date}\n\n说明:使用提供的网络搜索结果,对给定的查询写出全面的回复。确保在引用参考文献后使用 [[number](URL)] 符号进行引用结果. 如果提供的搜索结果涉及到多个具有相同名称的主题,请针对每个主题编写单独的答案。\n查询:{query}", "welcomeScreen": { "introduction1": "是一个非官方的ChatGPT客户端,但使用OpenAI的官方API", "introduction2": "在使用本客户端之前,您需要一个OpenAI API密钥。", diff --git a/pages/index.vue b/pages/index.vue index 360bd82..00e4b97 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -52,10 +52,10 @@ const fetchReply = async (message) => { ctrl = new AbortController() let webSearchParams = {} - console.log(enableWebSearch.value) if (enableWebSearch.value) { webSearchParams['web_search'] = { - ua: navigator.userAgent + ua: navigator.userAgent, + default_prompt: $i18n.t('webSearchDefaultPrompt') } }