autogpt for Node.js
由於作者的其他優先事項,該項目已被擱置。如果您想提前解決問題,請創建一個問題。
自主gpt作為節點。JS庫和CLI
什麼是Autogpt?
AutoGPT試圖使GPT-4完全自主。 AutoGPT是一個實驗性開源項目,展示了GPT-4語言模型的功能。該程序由GPT-4驅動,將LLM“ Thought”鏈接在一起,以自主實現您設定的任何目標。作為GPT-4完全自動運行的第一個示例之一,Auto-GPT推動了AI可能的邊界。
這不是完成產品,只是項目的開始。加入Discord社區以獲取最新的更新。
嘗試,直接使用而無需安裝
npx autogpt-node或用作node.js項目中的庫,以依賴關係安裝
npm install --save autogpt-node或用作終端中的命令行接口(CLI),在全球安裝
npm install -g autogpt-nodenpx autogpt-node --continuous=true --speak=true --headless=true選項
continuous - AutoGPT是否應該在不問的情況下繼續執行下一個動作?true - 完全自動。執行操作之前,無需用戶權限。false (默認) - 執行操作之前,請務必徵求許可。{n}例如3-不要要求每個n動作的權限。headless - 是否應該在無頭模式下加載瀏覽器(用於網絡分析,刮擦和搜索)?true (默認) - 瀏覽器將在無頭模式下加載。false您將看到何時自動訪問瀏覽器及其如何與之互動。speak - 響應是否應該從文本轉換為語音?true - 會大聲朗讀回答。false (默認) - 不會說話。此後,它將要求一些輸入,例如 - 您的自動實例應扮演的角色,實現目標列表,提示停止或繼續,等等。
# Name
What should we name it ?
> SEO-GPT
# Role
What is the role of SEO-GPT ?
> an AI to increase search traffic of a website using SEO
# Goal 1
Define the goal 1
> Fix technical SEO issues
# Goal 2
Define the goal 2
> Find the backlink opportunities
# ...3 more goals. enter to skip確保添加一個目標以阻止代理商,否則它可能會在很長一段時間內繼續運行。
autogpt-node --speak=true --headless=true確保定義配置
const autogpt = require ( 'autogpt-node' ) ;
var seoGPT = new autogpt ( {
openaiKey : process . env . OPENAI_API_KEY ,
explain : true ,
continuous : true
} ) ;
seoGPT . setRole ( "an AI to help with SEO for website" )
seoGPT . addGoal ( "Make a list of 10 technical SEO issues on the website" )
seoGPT . addGoal ( "For each technical issue, write the possible fix alongwith code" )
seoGPT . addGoal ( "Write the findings in a file" )
seoGPT . on ( "thought" , ( thought , reasoning , plan , criticism ) => { } )
seoGPT . on ( "action" , ( command , arguments ) => { } )
seoGPT . on ( "end" , ( results ) => { } )
seoGPT . start ( ) 在此處記錄包裝的API。托多。
| 多變的 | 描述 |
|---|---|
| OpenAI_API_KEY | 您的OpenAI平台API密鑰 |
| leverellabs_api_key | 您的Elevenlabs API鍵 |
| image_provider | 您要如何創建圖像,例如dalle,stable_diffusion |
| huggingface_api_token | 您的擁抱臉API令牌 |
確保在您的環境中可用.env.sample變量(以您為準)
.env.sample變量的理想方法是將.env.sample複製到新文件,例如新.env ,例如更改值,然後更改值,然後使用dotenv之類的軟件包將它們添加到路徑中。這些變量可以作為process.env.MY_ENV_VARIABLE_NAME在您的node.js代碼中訪問。.bashrc中添加.env.sample變量或操作系統的等效bash配置文件從:https://platform.openai.com/account/api-keys獲取OpenAi API密鑰。
要將OpenAI API密鑰用於自動GPT,您需要設置計費(又稱付費帳戶)。
您可以在https://platform.openai.com/account/billing/overview上設置付費帳戶。
從:https://elevenlabs.io獲取ElevenLabs API鍵。您可以使用網站上的“配置文件”選項卡查看xi-api-key 。
沒有貢獻很小。一起,我們可以做出我們所有人都可以為之驕傲的項目。您可以幫助發現錯誤,新功能,文檔建議,代碼貢獻,刪除單詞,等等。
啟發該項目的所有榮譽都用於用Python編寫的原始Autogpt項目。嘗試了一段時間後,我意識到一個node.js替代自動python帶來了某些優勢,例如
npm和其他Node.js軟件包管理器在軟件包安裝和管理方面更加友好和高效。這是主觀的,但事實是,如果我不努力地設置Autogpt,我就不會啟動這個項目。加入Discord社區進行討論和公告。要報告錯誤或提交功能請求,請在GitHub上創建問題。
麻省理工學院許可證