
- OpenAI漢化腳本
OpenAI漢化腳本-openai.com漢化,油猴用戶腳本管理器腳本,能夠漢化界面的部分菜單及內(nèi)容,對英文不敏感的同學可以試試這個油猴腳本,經(jīng)過安裝體驗了一下,還是有一些沒有漢化完整的,如果是用不了瀏覽器Chrome等等的翻譯,可以試試這個OpenAI漢化腳本 - // ==UserScript==
- // @name openai.com漢化
- // @namespace Violentmonkey Scripts
- // @match https://*.openai.com/*
- // @grant none
- // @version 1.1
- // @author -
- // @description 漢化界面的部分菜單及內(nèi)容
- // @author bingqilin
- // @namespace https://t.me/bingqilina
- // @license MIT
- // ==/UserScript==
- (function() {
- 'use strict';
- const i18n = new Map([
- ['To-Do', '待辦事項'],
- ['Welcome to ChatGPT', '歡迎來到ChatGPT'],
- ['Log in with your OpenAI account to continue', '用您的OpenAI賬戶登錄以繼續(xù)'],
- ['Log in', '登錄'],
- ['Sign up', '注冊'],
- ['You need an OpenAI account', '您需要一個OpenAI賬戶'],
- ['You must have an OpenAI account to use ChatGPT. If you don\'t have one, sign up now and return to chat.openai.com to log in and continue.', '您必須有一個OpenAI賬戶才能使用ChatGPT。如果您還沒有,現(xiàn)在就注冊,然后返回chat.openai.com登錄并繼續(xù)。'],
- ['Create an OpenAI account', '創(chuàng)建一個OpenAI賬戶'],
- ['Cancel', '取消'],
- ['Create your account', '創(chuàng)建您的賬戶'],
- ['Email address', '電子郵件地址'],
- ['Enter the code shown above', '輸入上面顯示的代碼'],
- ['Continue', '繼續(xù)'],
- ['Already have an account? Log in', '已經(jīng)有了一個賬戶?請登錄'],
- ['Continue with Google', '繼續(xù)使用谷歌'],
- ['Continue with Microsoft Account', '繼續(xù)使用微軟賬戶'],
- ['with Google', '用谷歌'],
- ['with Microsoft Account', '使用微軟賬戶'],
- ['Already have an account?', '已經(jīng)有了一個賬戶?'],
- ['Not available', '不可用'],
- ['OpenAI\'s services are not available in your country.', 'OpenAI的服務在您的國家無法使用。'],
- ['Create Your Account', '創(chuàng)建您的賬戶'],
- ['PasswordShow passwordShow password', '密碼顯示密碼顯示密碼'],
- ['Your password must contain:', '您的密碼必須包含。'],
- ['At least 8 characters', '至少有8個字符'],
- ['Verify your email', '驗證您的電子郵件'],
- ['We sent an email to ', '我們發(fā)送了一封電子郵件給 '],
- ['Click the link inside to get started.', '點擊里面的鏈接即可開始。'],
- ['Open Gmail?', '打開Gmail'],
- ['Resend email?', '重新發(fā)送電子郵件'],
- ['Tell us about you', '告訴我們你的情況'],
- ['First name', '名'],
- ['Last name', '姓氏'],
- ['Organization name', '組織名稱'],
- ['By clicking \"Continue\", you agree to our Terms and confirm you\'re 18 years or older.', '通過點擊繼續(xù),你同意我們的條款,并確認你是18歲或以上。'],
- ['Enter code', '輸入代碼'],
- ['Please enter the code we just sent you.', '請輸入我們剛剛發(fā)給你的代碼。'],
- ['How will you primarily use OpenAI?', '您將主要如何使用OpenAI?'],
- ['I\'m building a product or feature', '我正在構(gòu)建一個產(chǎn)品或功能'],
- ['I\'m exploring personal use', '我在探索個人使用'],
- ['I\'m conducting AI research', '我正在進行人工智能研究'],
- ['I\'m a journalist or content creator', '我是一名記者或內(nèi)容創(chuàng)作者'],
- ['Overview', '概況'],
- ['Documentation', '文檔'],
- ['Examples', '實例'],
- ['Playground', '游戲場'],
- ['Introducing ChatGPT research release', '介紹ChatGPT研究版本'],
- ['Welcome to OpenAI', '歡迎來到OpenAI'],
- ['Start with the basics', '從基礎知識開始'],
- ['Quickstart tutorial', '快速入門教程'],
- ['Learn by building a quick sample app', '通過建立一個快速樣本應用程序來學習'],
- ['Explore some example tasks', '探索一些示例任務'],
- ['Build an application', '構(gòu)建一個應用程序'],
- ['We no longer require you to register your applications with OpenAI.', '我們不再要求您向OpenAI注冊您的應用程序。'],
- ['Text completion', '文本完成'],
- ['Generate and edit text', '生成和編輯文本'],
- ['Code completionLimited beta', '代碼補全有限的測試版'],
- ['Generate, edit, and explain code', '生成、編輯和解釋代碼'],
- ['Image generationBeta', '圖像生成Beta版'],
- ['Generate and edit images', '生成和編輯圖像'],
- ['Fine-tuning', '微調(diào)'],
- ['Train a model for your use case', '為你的用例訓練一個模型'],
- ['Embeddings', '嵌入系統(tǒng)'],
- ['Search, classify, and compare text', '搜索、分類和比較文本'],
- ['Help center', '幫助中心'],
- ['Answers to frequently asked questions.', '對常見問題的回答。'],
- ['Visit help center', '訪問幫助中心'],
- ['Community', '社區(qū)'],
- ['Ask questions and discuss topics with other developers.', '提出問題并與其他開發(fā)者討論主題。'],
- ['Visit community', '訪問社區(qū)'],
- ['Meet ambassadors', '認識大使'],
- ['Support', '支持服務'],
- ['Get in touch with an OpenAI support specialist.', '與OpenAI的支持專家取得聯(lián)系。'],
- ['Clear conversations', '清除對話'],
- ['Confirm clear conversations', '確認清除所有對話'],
- ['New chat', '新對話'],
- ['Chat with us', '與我們聊天'],
- ['Upgrade to Plus', '升級至Plus'],
- ['Available even when demand is high', '即使需求量大也可用'],
- ['Available when demand is low', '需求低時可用'],
- ['Faster response speed', '更快的響應速度'],
- ['Standard response speed', '標準響應速度'],
- ['Priority access to new features', '優(yōu)先使用新功能'],
- ['Regular model updates', '定期更新模型'],
- ['Free Research Preview. Our goal is to make AI systems more natural and safe to interact with. Your feedback will help us improve.', '免費研究預覽。 我們的目標是使AI系統(tǒng)更自然和安全地與之互動。 您的反饋將幫助我們改善。'],
- ['Personal', '個人'],
- ['Try it?', '試試吧'],
- ['Read more?', '閱讀更多'],
- ['Manage account', '管理賬戶'],
- ['View API keys', '查看API密鑰'],
- ['Invite team', '邀請團隊'],
- ['Help', '幫助'],
- ['Pricing', '價格'],
- ['Terms & policies', '條款和政策'],
- ['Log out', '登出'],
- ['Could not fetch usage for this organization, if this issue persists please contact us through our help center at help.openai.com.', '無法獲取該組織的使用情況,如果這個問題持續(xù)存在,請通過我們的幫助中心help.openai.com聯(lián)系我們。'],
- ['Usage', '使用情況'],
- ['Below you\'ll find a summary of API usage for your organization. All dates and times are UTC-based, and data may be delayed up to 5 minutes.', '下面你會發(fā)現(xiàn)你的組織的API使用情況的摘要。所有的日期和時間都是基于UTC的,數(shù)據(jù)可能會延遲5分鐘。'],
- ['December', '十二月'],
- ['DAILY', '每日'],
- ['CUMULATIVE', '累計'],
- ['Daily usage', '每日使用量'],
- ['Aggregate daily usage is not available before March 1st, 2022', '在2022年3月1日之前,每日累計使用量不可用。'],
- ['Free trial usage', '免費試用用量'],
- ['GRANT #', '補助金 # 授予的信用過期'],
- ['Daily usage breakdown ', '每日使用量分類 '],
- ['All org members', '所有組織成員'],
- ['Model usage', '模型使用量'],
- ['requests', '請求'],
- ['API keys', 'API密鑰'],
- ['Your secret API keys are listed below. Please note that we do not display your secret API keys again after you generate them.', '你的秘密API密鑰列在下面。請注意,在你生成API密匙后,我們不會再顯示你的密匙。'],
- ['Do not share your API key with others, or expose it in the browser or other client-side code. In order to protect the security of your account, OpenAI may also automatically rotate any API key that we\'ve found has leaked publicly.', '請不要與他人分享您的API密鑰,也不要在瀏覽器或其他客戶端代碼中曝光。為了保護您的賬戶安全,OpenAI也可能會自動旋轉(zhuǎn)任何我們發(fā)現(xiàn)已經(jīng)公開泄露的API密鑰。'],
- ['You currently do not have any API keys. Please create one below.', '您目前沒有任何API密鑰。請在下面創(chuàng)建一個。'],
- ['Default organization', '默認組織'],
- ['If you belong to multiple organizations, this setting controls which organization is used by default when making', '如果您屬于多個組織,此設置可以控制在使用上述API密鑰時默認使用哪個組織。'],
- ['with the API keys above.', '使用上述API密鑰時,默認使用哪個組織。'],
- ['Note: You can also specify which organization to use for each API request. ', '注意:你也可以為每個API請求指定使用哪個組織。'],
- ['Payment methods', '支付方式'],
- ['Billing history', '賬單歷史'],
- ['Preferences', '偏好'],
- ['Billing overview', '賬單概覽'],
- ['Free trial', '免費試用'],
- ['You are currently on the free trial. Head over to your', '您目前正處于免費試用階段。請到您的'],
- ['page to view how many free trial credits are remaining on your account.', '頁面,查看您的賬戶中還有多少免費試用點數(shù)。'],
- ['Payment methods', '付款方式'],
- ['Add or change payment method', '添加或更改付款方式'],
- ['Billing history', '賬單歷史'],
- ['View past and current invoices', '查看過去和當前的發(fā)票'],
- ['Set monthly spend limits', '設置每月支出限額'],
- ['Preferences', '首選項'],
- ['Manage company information', '管理公司信息'],
- ['View pricing and FAQs', '查看價格和常見問題'],
- ['GET STARTED', '開始吧'],
- ['Introduction', '介紹'],
- ['Key concepts', '關鍵概念'],
- ['Next steps', '接下來的步驟'],
- ['Libraries', '圖書館'],
- ['Models', '模型'],
- ['GUIDES', '指南'],
- ['Code completion', '代碼完成'],
- ['Image generation', '圖像生成'],
- ['Moderation', '微調(diào)'],
- ['Safety best practices', '安全的最佳實踐'],
- ['Production best practices', '生產(chǎn)最佳實踐'],
- ['API REFERENCE', 'API參考'],
- ['Introduction', '簡介'],
- ['Authentication', '認證'],
- ['Models', '模型'],
- ['Completions', '完成'],
- ['Edits', '編輯'],
- ['Images', '圖片'],
- ['Files', '檔案'],
- ['Fine-tunes', '微調(diào)'],
- ['Moderations', '審校'],
- ['Engines', '引擎'],
- ['Parameter details', '參數(shù)詳情'],
- ['Answer questions based on existing knowledge.', '在現(xiàn)有知識的基礎上回答問題。'],
- ['Grammar correction', '語法糾正'],
- ['Corrects sentences into standard English.', '將句子糾正為標準英語。'],
- ['Summarize for a 2nd grader', '為二年級學生總結(jié)'],
- ['Translates difficult text into simpler concepts.', '將困難的文本翻譯成更簡單的概念。'],
- ['Natural language to OpenAI API', '自然語言到OpenAI API'],
- ['Create code to call to the OpenAI API using a natural language instruction.', '創(chuàng)建代碼,使用自然語言指令調(diào)用OpenAI API。'],
- ['Text to command', '文本到命令'],
- ['Translate text into programmatic commands.', '將文本翻譯成程序性指令。'],
- ['English to other languages', '英語到其他語言'],
- ['Translates English text into French, Spanish and Japanese.', '將英語文本翻譯成法語、西班牙語和日語。'],
- ['Natural language to Stripe API', '自然語言到Stripe API'],
- ['Create code to call the Stripe API using natural language.', '創(chuàng)建代碼以使用自然語言調(diào)用Stripe API。'],
- ['SQL translate', 'SQL翻譯'],
- ['Translate natural language to SQL queries.', '將自然語言翻譯成SQL查詢。'],
- ['Parse unstructured data', '解析非結(jié)構(gòu)化數(shù)據(jù)'],
- ['Create tables from long form text', '從長格式文本中創(chuàng)建表格'],
- ['Classification', '分類'],
- ['Classify items into categories via example.', '通過實例將項目分類。'],
- ['Python to natural language', '從Python到自然語言'],
- ['Explain a piece of Python code in human understandable language.', '用人類可理解的語言解釋一段Python代碼。'],
- ['Movie to Emoji', '電影到表情符號'],
- ['Convert movie titles into emoji.', '將電影標題轉(zhuǎn)換為表情符號。'],
- ['Calculate Time Complexity', '計算時間復雜度'],
- ['Find the time complexity of a function.', '找到一個函數(shù)的時間復雜性。'],
- ['Translate programming languages', '翻譯編程語言'],
- ['Translate from one programming language to another', '從一種編程語言翻譯成另一種編程語言'],
- ['Advanced tweet classifier', '高級推文分類器'],
- ['Advanced sentiment detection for a piece of text.', '對一段文字進行高級情感檢測。'],
- ['Explain code', '解釋代碼'],
- ['Explain a complicated piece of code.', '解釋一段復雜的代碼。'],
- ['Keywords', '關鍵詞'],
- ['Extract keywords from a block of text.', '從一個文本塊中提取關鍵詞。'],
- ['Factual answering', '事實性回答'],
- ['Ad from product description', '從產(chǎn)品描述到廣告'],
- ['Turn a product description into ad copy.', '將產(chǎn)品描述變成廣告文案。'],
- ['Product name generator', '產(chǎn)品名稱生成器'],
- ['Create product names from examples words. Influenced by a community prompt.', '從實例詞中創(chuàng)建產(chǎn)品名稱。受社區(qū)提示的影響。'],
- ['TL;DR summarization', 'TL;DR總結(jié)'],
- ['Summarize text by adding a \'tl;dr:\' to the end of a text passage. It shows that the API understands how to perform a number of tasks with no instructions.', '通過在文本段落的末尾添加tl;dr來總結(jié)文本。它表明API理解如何執(zhí)行一些沒有說明的任務。'],
- ['Python bug fixer', 'Python錯誤修復器'],
- ['Find and fix bugs in source code.', '查找并修復源代碼中的錯誤。'],
- ['Spreadsheet creator', '電子表格創(chuàng)建器'],
- ['Create spreadsheets of various kinds of data. It\'s a long prompt but very versatile. Output can be copy+pasted into a text file and saved as a .csv with pipe separators.', '創(chuàng)建各種數(shù)據(jù)的電子表格。這是一個很長的提示,但用途非常廣泛。輸出可以復制+粘貼到文本文件中,并保存為帶有管道分隔符的.csv。'],
- ['JavaScript helper chatbot', 'JavaScript助手聊天機器人'],
- ['Message-style bot that answers JavaScript questions', '回答JavaScript問題的消息式機器人'],
- ['ML/AI language model tutor', 'ML/AI語言模型輔導員'],
- ['Bot that answers questions about language models', '回答關于語言模型問題的機器人'],
- ['Science fiction book list maker', '科幻書單制作者'],
- ['Create a list of items for a given topic.', '為一個給定的主題創(chuàng)建一個項目列表。'],
- ['Tweet classifier', '推特分類器'],
- ['Basic sentiment detection for a piece of text.', '對一段文字進行基本的情感檢測。'],
- ['Airport code extractor', '機場代碼提取器'],
- ['Extract airport codes from text.', '從文本中提取機場代碼。'],
- ['SQL request', 'SQL請求'],
- ['Create simple SQL queries.', '創(chuàng)建簡單的SQL查詢。'],
- ['Extract contact information', '提取聯(lián)系信息'],
- ['Extract contact information from a block of text.', '從一個文本塊中提取聯(lián)系信息。'],
- ['JavaScript to Python', '將JavaScript轉(zhuǎn)換為Python'],
- ['Convert simple JavaScript expressions into Python.', '將簡單的JavaScript表達式轉(zhuǎn)換成Python。'],
- ['Friend chat', '朋友聊天'],
- ['Emulate a text message conversation.', '模仿文本信息對話。'],
- ['Mood to color', '心情到顏色'],
- ['Turn a text description into a color.', '把文本描述變成一種顏色。'],
- ['Write a Python docstring', '寫一個Python文檔串'],
- ['An example of how to create a docstring for a given Python function. We specify the Python version, paste in the code, and then ask within a comment for a docstring, and give a characteristic beginning of a docstring', '一個如何為給定的Python函數(shù)創(chuàng)建一個文檔串的例子。我們指定Python版本,粘貼代碼,然后在注釋中詢問一個文檔串,并給出一個文檔串的特征開頭'],
- ['Analogy maker', '類比生成器'],
- ['Create analogies. Modified from a community prompt to require fewer examples.', '創(chuàng)建類比。從社區(qū)提示中修改,要求減少例子。'],
- ['JavaScript one line function', 'JavaScript單行函數(shù)'],
- ['Turn a JavaScript function into a one liner.', '把一個JavaScript函數(shù)變成一個單行字。'],
- ['Micro horror story creator', '微型恐怖故事創(chuàng)建者'],
- ['Creates two to three sentence short horror stories from a topic input.', '從一個主題輸入創(chuàng)建兩到三句話的短篇恐怖故事。'],
- ['Third-person converter', '第三人稱轉(zhuǎn)換器'],
- ['Converts first-person POV to the third-person. This is modified from a community prompt to use fewer examples.', '將第一人稱POV轉(zhuǎn)換為第三人稱。這是從社區(qū)提示中修改的,使用較少的例子。'],
- ['Notes to summary', '筆記到摘要'],
- ['Turn meeting notes into a summary.', '將會議記錄變成摘要。'],
- ['VR fitness idea generator', 'VR健身創(chuàng)意生成器'],
- ['Create ideas for fitness and virtual reality games.', '創(chuàng)建健身和虛擬現(xiàn)實游戲的創(chuàng)意。'],
- ['ESRB rating', 'ESRB評級'],
- ['Categorize text based upon ESRB ratings.', '根據(jù)ESRB評級對文本進行分類。'],
- ['Essay outline', '作文提綱'],
- ['Generate an outline for a research topic.', '為一個研究課題生成一個大綱。'],
- ['Recipe creator ', '菜譜創(chuàng)建者 '],
- ['eat at your own risk', '自食其果'],
- ['Create a recipe from a list of ingredients.', '根據(jù)成分清單創(chuàng)建一個食譜。'],
- ['Open ended conversation with an AI assistant.', '與人工智能助手進行開放式對話。'],
- ['Marv the sarcastic chat bot', '諷刺性聊天機器人Marv'],
- ['Marv is a factual chatbot that is also sarcastic.', 'Marv是一個實事求是的聊天機器人,也會諷刺人。'],
- ['Turn by turn directions', '轉(zhuǎn)彎指示'],
- ['Convert natural language to turn-by-turn directions.', '將自然語言轉(zhuǎn)換為轉(zhuǎn)彎指示。'],
- ['Restaurant review creator', '餐廳評論創(chuàng)建者'],
- ['Turn a few words into a restaurant review.', '將幾句話變成餐廳評論。'],
- ['Create study notes', '創(chuàng)建學習筆記'],
- ['Provide a topic and get study notes.', '提供一個主題并獲得學習筆記。'],
- ['Interview questions', '面試問題'],
- ['Guide the model towards factual answering by showing it how to respond to questions that fall outside its knowledge base. Using a', '通過向模型展示如何回答超出其知識庫的問題,引導模型進行事實性回答。使用一個'],
- ['to indicate a response to words and phrases that it doesn\'t know provides a natural response that seems to work better than more abstract replies', '來表示對它不知道的單詞和短語的回答,提供了一種自然的回答,似乎比更抽象的回答效果更好。'],
- ['Explore what\'s possible with some example applications', '通過一些應用實例探索可能的結(jié)果'],
- ['Get started', '開始吧'],
- ['Enter an instruction or select a preset, and watch the API respond with a ', '輸入一個指令或選擇一個預設,然后看著API響應一個 '],
- ['completion', '完成'],
- ['that attempts to match the context or pattern you provided.', '試圖匹配你提供的上下文或模式。'],
- ['You can control which ', '你可以通過改變模型來控制哪個 '],
- ['completes your request by changing the model.', '來完成你的請求。'],
- ['KEEP IN MIND', '牢記'],
- ['Use good judgment when sharing outputs, and attribute them to your name or company. ', '在分享產(chǎn)出時要有良好的判斷力,并將它們歸于你的名字或公司。'],
- ['Learn more', '了解更多'],
- ['Requests submitted to our models may be used to train and improve future models. ', '提交給我們的模型的請求可能被用來訓練和改進未來的模型。'],
- ['Our default models\' training data cuts off in 2021, so they may not have knowledge of current events.', '我們默認模型的訓練數(shù)據(jù)在2021年截止,因此它們可能不了解當前的事件。'],
- ['Write a tagline for an ice cream shop', '為一家冰淇淋店寫標語'],
- ['Load a preset', '加載一個預設'],
- ['Mode', '模式'],
- ['Temperature', '溫度'],
- ['Maximum length', '最大長度'],
- ['Stop sequences', '停止序列'],
- ['Enter sequence and press Tab', '輸入序列并按Tab鍵'],
- ['Top P', '頂部P'],
- ['Frequency penalty', '頻率懲罰'],
- ['Presence penalty', '存在的懲罰'],
- ['Best of', '最佳'],
- ['Inject start text', '注入開始文本'],
- ['Inject restart text', '注入重新開始的文本'],
- ['Show probabilities', '顯示概率'],
- ['Controls diversity via nucleus sampling:', '通過細胞核取樣控制多樣性。'],
- ['0.5 means half of all likelihood-weighted options are considered.', '0.5意味著所有可能性加權(quán)選項的一半被考慮。'],
- ['How much to penalize new tokens based on whether they appear in the text so far. Increases the model\'s likelihood to talk about new topics', '根據(jù)到目前為止是否在文本中出現(xiàn),對新標記的懲罰程度。增加模型談論新話題的可能性'],
- ['Generates multiple ', '生成多個 '],
- ['server-side, and displays only the best. Streaming only works when set to 1. Since it acts as a multiplier on the number of', '在服務器端生成多個新標記,并只顯示最好的。流動只在設置為1時才起作用。'],
- ['this parameters can eat into your token quota very quickly – use caution!', '這個參數(shù)會很快吞噬你的代幣配額--請謹慎使用!'],
- ['Text to append after the user\'s input to format the model for a response', '在用戶輸入后附加的文本,以格式化響應的模型'],
- ['Toggle token highlighting which indicates how likely a token was to be generated. ', '切換令牌的高亮顯示,顯示令牌生成的可能性。'],
- ['to debug a given generation, or see alternative options for a token', '調(diào)試一個給定的生成,或查看一個令牌的替代選項'],
- ['Up to four sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence', '最多四個序列,API將停止生成更多的標記。返回的文本將不包含停止序列'],
- ['The maximum number of tokens to ', '要生成的標記的最大數(shù)量。'],
- ['generat', '生成的最大數(shù)量'],
- ['Requests can use up to 2,048 or 4,000 tokens shared between prompt and', '請求可以使用最多2,048個或4,000個令牌,在提示和提示之間共享。'],
- ['The exact limit varies by model', '具體限制因型號而異'],
- ['One token is roughly 4 characters for normal English text', '對于正常的英文文本,一個標記大約是4個字符。'],
- ['Controls randomness: Lowering results in less random', '控制隨機性。降低的結(jié)果是減少隨機性'],
- ['As the temperature approaches zero, the model will become deterministic and repetitive.', '當溫度接近零時,模型將變得確定性和重復性。'],
- ['The model which will generate the ', '將產(chǎn)生的模型 '],
- ['Some models are suitable for natural language tasks, others specialize in code', '有些模型適用于自然語言任務,有些則專門用于代碼'],
- ['Content filter preferences', '內(nèi)容過濾偏好'],
- ['View code', '查看代碼'],
- ['You can use the following code to start integrating your current prompt and settings into your application', '您可以使用以下代碼開始將您當前的提示和設置整合到您的應用程序中'],
- ['Your API Key can be found', '可以找到你的API密鑰'],
- ['You should use environment variables or a secret management tool to expose your key to your applications', '你應該使用環(huán)境變量或秘密管理工具,將你的密鑰暴露給你的應用程序'],
- ['Most capable model in the GPT-3series.Can perform any task the other ', 'GPT-3系列中能力最強的型號,可以執(zhí)行其他型號的任何任務。'],
- ['models can,oftenwith higher quality,longer outputand better instruction-following.Itcan process up to 4,000 tokensper request.', '它可以處理多達4,000個標記的請求。'],
- ['STRENGTHS', '優(yōu)勢'],
- ['Updated', '更新于'],
- ['Forks', '復刻'],
- ])
- replaceText(document.body)
- // |
- const bodyObserver = new MutationObserver(mutations => {
- mutations.forEach(mutation => {
- mutation.addedNodes.forEach(addedNode => replaceText(addedNode))
- })
- })
- bodyObserver.observe(document.body, { childList: true, subtree: true })
- function replaceText(node) {
- nodeForEach(node).forEach(htmlnode => {
- i18n.forEach((value, index) => {
- // includes可直接使用 === 以提高匹配精度
- const textReg = new RegExp(index, 'g')
- if (htmlnode instanceof Text && htmlnode.nodeValue.includes(index))
- htmlnode.nodeValue = htmlnode.nodeValue.replace(textReg, value)
- else if (htmlnode instanceof HTMLInputElement && htmlnode.value.includes(index))
- htmlnode.value = htmlnode.value.replace(textReg, value)
- })
- })
- }
- function nodeForEach(node) {
- const list = []
- if (node.childNodes.length === 0) list.push(node)
- else {
- node.childNodes.forEach(child => {
- if (child.childNodes.length === 0) list.push(child)
- else list.push(...nodeForEach(child))
- })
- }
- return list
- }
- })();
聲明本文內(nèi)容來自網(wǎng)絡,若涉及侵權(quán),請聯(lián)系我們刪除! 投稿需知:請以word形式發(fā)送至郵箱18067275213@163.com
從來沒有這么靠前過啊,不錯,女兒很可愛:-)