首頁  >  文章  >  科技週邊  >  適用於 VS Code 的 6 個最佳 ChatGPT 擴展

適用於 VS Code 的 6 個最佳 ChatGPT 擴展

WBOY
WBOY原創
2024-06-14 20:25:31856瀏覽

ChatGPT 可以透過其網頁聊天介面幫助您解決許多程式設計問題。但跳進跳出 VS Code 可能會分散注意力。請記住,當您處於程式設計區時,每一秒都很重要。

好消息是,您可以使用 ChatGPT 擴充功能在 VS Code 中向 ChatGPT 詢問任何內容。 ChatGPT 涵蓋了大量的編碼需求,包括單元測試、調試、文件、程式碼解釋和程式碼生成。

以下是您現在可以為 VS Code 安裝的最方便的 ChatGPT 擴充功能。

1. ChatGPT - EasyCode

6 Best ChatGPT Extensions for VS Code

EasyCode 的 ChatGPT 擴充功能是一種透過不同語言模型獲得 AI 幫助的現成方法。它支援 ChatGPT-3.5 和 ChatGPT-4,並且可以在它們之間輕鬆切換。該擴展還支援 Claude AI(ChatGPT 的替代方案)。如果您的 OpenAI 帳戶包含 GPT-4 的進階功能,您也可以新增 API 金鑰以供擴充功能使用。

雖然其開發者建議您註冊或安裝後登錄,但您仍然可以在沒有帳戶的情況下使用 ChatGPT。在尋求協助時,您可以向 ChatGPT 詢問有關部分程式碼的問題,或允許它掃描您的整個程式碼庫以獲取更廣泛的用途。

如果您先前的提示需要進一步解釋,EasyCode ChatGPT 擴充功能也具有後續選項。除了內聯程式碼自動完成之外,它還具有單擊內建提示來隨時隨地產生回應的功能。

2. Tim Kmecl 的 CodeGPT

6 Best ChatGPT Extensions for VS Code

Tim Kmcel 的 CodeGPT 擴充使用 ChatGPT-3 模型。因此,它可能比使用 GPT-3.5 和 GPT-4 的其他擴展資源更少。它具有內建提示,只需單擊即可產生回應。如果您有更具體的請求,您也可以透過聊天框編寫自訂提示。

雖然它具有許多 GPT-3 模型 - 包括 ChatGPT、text-curie-001、text-davinci-003、code-davinci-002 和 code-cushman-002 - text-davinci-003 是預設情況下唯一與擴充一起使用的模型。如果擴充拋出錯誤,您可能需要檢查您的模型選擇,並在擴充設定中將其設定為 text-davinci-003。

另一個有價值的功能是程式碼索引,它允許您突出顯示程式碼並在處理複雜情況時尋求幫助。此擴充功能需要 OpenAI API 金鑰,您可以在安裝後在其設定選單中設定該金鑰。但是,如果您用完免費的 OpenAI 積分,擴充可能會失敗。

3. Code GPT

6 Best ChatGPT Extensions for VS Code

Code GPT 為 VS Code 提供了更具包容性的 AI 服務。儘管其預設的 AI 模型選擇來自 OpenAI 的 ChatGPT-3.5 和 ChatGPT-4,但它也具有 ChatGPT 替代方案,包括 Cohere、AI21、Google 的 Bard 和 Anthropic 等。

Code GPT 擴充功能需要您的OpenAI API 金鑰,您可以透過按VS Code 指令面板快速鍵(對於Mac 為CMD+Shift+P,對於Windows 為Ctrl+Shift+P)來設定該密鑰。但是,請確保您有足夠的免費信用或高級計劃來享受此 VS Code AI 服務。 Code GPT 的一個有價值的功能是它能夠從程式碼註釋中獲取提示並將生成的程式碼插入到可用的程式碼檔案(以目標程式語言)中。

它具有內建和自訂提示。一個小挫折是它只允許每個請求最多 800 個令牌,因此它支援的文字比其他一些提供者少。

4. ChatGPT Helper

6 Best ChatGPT Extensions for VS Code

ChatGPT Helper VS Code 擴充功能是一個簡單的 AI 助手,如果您只需要快速解決程式設計問題,可以將其新增至 VS Code。此擴充功能易於使用,僅設計用於接受有限數量的內建提示。

ChatGPT Helper 擴充功能支援 GPT-3.5 和 GPT-4,並且可以在它們之間切換。它需要 OpenAI API 金鑰,安裝後發送第一個提示後,擴充功能會提示您包含該金鑰。

但是,與其他 ChatGPT 擴充功能不同,它沒有聊天功能。但您可以透過 VS Code 的命令選項板發送自訂和內建提示。它將回應寫入單獨的文字檔案中,讓您可以儲存提示回復以供以後使用。

5. ChatGPT - Genie AI

6 Best ChatGPT Extensions for VS Code

The ChatGPT extension by Genie AI has a better aesthetic, featuring built-in prompts in a more relatable interface. It supports GPT-3, GPT-3.5, and GPT-4. And like many ChatGPT extensions mentioned previously, it also requires an OpenAI API key.

It allows you to select different precision temperatures tailored to your requirements; you can choose between a precise, balanced, or creative response. In addition to built-in clickable prompts, you can engage ChatGPT via the Genei AI VS Code extension's Ad-hoc prompt box to send more specific queries.

While using the extension, you don't need to manually copy and paste the code it generates. Genie AI will automatically write responses into relevant code files, which you can use directly in your app. You can also save your conversations locally and resume them later.

6. ChatGPT VS Code Plugin by Jay Barnes

6 Best ChatGPT Extensions for VS Code

If you want to use ChatGPT for free, the ChatGPT VS Code extension by Jay Barnes comes in handy. It operates on a different level and requires your ChatGPT web session token and user agent rather than your OpenAI API key. So it's invariably free since it extends your interaction with ChatGPT from the web.

While it allows you to use ChatGPT for free in VS Code, it's technical to set up and can be tardy with occasional failures. Additionally, you'll periodically reset your access tokens since these expire with your ChatGPT web session.

Like other ChatGPT extensions, it features built-in prompts and accepts custom ones via the chat menu. Overall, this extension wouldn't have made our list of the best ChatGPT extensions for VS Code. But it's free and may be handy when you exhaust your free credit. However, be careful to prevent your session from getting hijacked.

Use ChatGPT Productively in VS Code

ChatGPT and other generative AI models have found valuable uses in our daily lives. Whether we accept them or not, they're here to stay. These AI tools are more helpful than they are threatening if you use them productively.

Using these ChatGPT extensions for programming doesn't guarantee a smooth run. You'll still need a combination of these AI tools with human input and some internet search skills to solve programming problems. You might want to see how to use ChatGPT in VS Code, for a practical sense of how these extensions work.

以上是適用於 VS Code 的 6 個最佳 ChatGPT 擴展的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn