国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

任務(wù)拆解,悠然自得,自動(dòng)版本的ChatGPT,AutoGPT自動(dòng)人工智能AI任務(wù)實(shí)踐(Python3.10)

這篇具有很好參考價(jià)值的文章主要介紹了任務(wù)拆解,悠然自得,自動(dòng)版本的ChatGPT,AutoGPT自動(dòng)人工智能AI任務(wù)實(shí)踐(Python3.10)。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

當(dāng)我們使用ChatGPT完成某些工作的時(shí)候,往往需要多輪對(duì)話,比如讓ChatGPT分析、翻譯、總結(jié)一篇網(wǎng)上的文章或者文檔,再將總結(jié)的結(jié)果以文本的形式存儲(chǔ)在本地。過(guò)程中免不了要和ChatGPT“折沖樽俎”一番,事實(shí)上,這個(gè)“交涉”的過(guò)程也可以自動(dòng)化,AutoGPT可以幫助我們自動(dòng)拆解任務(wù),沒(méi)錯(cuò),程序能做到的事情,人類絕不親力親為。

我們唯一需要做的,就是告訴AutoGPT一個(gè)任務(wù)目標(biāo),AutoGPT會(huì)自動(dòng)根據(jù)任務(wù)目標(biāo)將任務(wù)拆解成一個(gè)個(gè)的小任務(wù),并且逐個(gè)完成,簡(jiǎn)單且高效。

配置AutoGPT

先確保本地環(huán)境安裝好了Python3.10.9。

接著運(yùn)行Git命令拉取項(xiàng)目:

git clone https://github.com/Significant-Gravitas/Auto-GPT.git

隨后進(jìn)入項(xiàng)目的目錄:

cd Auto-GPT

安裝相關(guān)的依賴庫(kù):

pip3 install -r requirements.txt

安裝成功后,復(fù)制一下項(xiàng)目的配置文件:

cp .env.template .env

這里通過(guò)cp命令將配置文件模版.env.template復(fù)制成為一個(gè)新的配置文件.env。

隨后將Openai的秘鑰填入配置文件:

### OPENAI  
# OPENAI_API_KEY - OpenAI API Key (Example: my-openai-api-key)  
# TEMPERATURE - Sets temperature in OpenAI (Default: 0)  
# USE_AZURE - Use Azure OpenAI or not (Default: False)  
OPENAI_API_KEY=您的秘鑰  
TEMPERATURE=0  
USE_AZURE=False

除了Openai官方的接口秘鑰,AutoGPT也支持微軟Azure的接口。

如果希望使用微軟Azure的接口,需要將配置中的USE_AZURE設(shè)置為True,隨后復(fù)制azure.yaml.template配置模版為新的azure.yaml配置文件。

接著將微軟Azure服務(wù)的秘鑰填入azure.yaml即可。

由于微軟Azure接入Openai接口需要極其復(fù)雜的申請(qǐng)流程,這里還是直接使用OpenAI官方的接口。

當(dāng)然了,如果不想在本地裝那么多依賴,也可以通過(guò)Docker來(lái)構(gòu)建Auto-GPT的容器:

docker build -t autogpt .  
docker run -it --env-file=./.env -v $PWD/auto_gpt_workspace:/app/auto_gpt_workspace autogpt

這里Docker會(huì)自動(dòng)讀取項(xiàng)目中的Dockerfile配置文件進(jìn)行構(gòu)建,相當(dāng)方便。

至此,Auto-GPT就配置好了。

運(yùn)行Auto-GPT

在項(xiàng)目根目錄運(yùn)行命令:

python3 -m autogpt --debug

即可啟動(dòng)AutoGPT:

?  Auto-GPT git:(master) python -m autogpt --debug         
Warning: The file 'AutoGpt.json' does not exist. Local memory would not be saved to a file.  
Debug Mode:  ENABLED  
Welcome to Auto-GPT!  Enter the name of your AI and its role below. Entering nothing will load defaults.  
Name your AI:  For example, 'Entrepreneur-GPT'  
AI Name:

首先創(chuàng)建AutoGPT機(jī)器人的名字:

AI Name: v3u.cn  
v3u.cn here!  I am at your service.  
Describe your AI's role:  For example, 'an AI designed to autonomously develop and run businesses with the sole goal of increasing your net worth.'  
v3u.cn is:

創(chuàng)建好名字以后,Auto-GPT就可以隨時(shí)為您效勞了。

首先為AutoGPT設(shè)置目標(biāo):

v3u.cn is: Analyze the contents of this article,the url is https://v3u.cn/a_id_303,and write the result to goal.txt

這里我們要求AutoGPT分析并且總結(jié)v3u.cn/a_id_303這篇文章,并且將分析結(jié)果寫入本地的goal.txt文件。

程序返回:

Enter up to 5 goals for your AI:  For example: Increase net worth, Grow Twitter Account, Develop and manage multiple businesses autonomously'  
Enter nothing to load defaults, enter nothing when finished.  
Goal 1:   
Using memory of type:  LocalCache

AutoGPT會(huì)告訴你可以最多拆解為五個(gè)任務(wù),我們可以自己拆解,也可以讓機(jī)器人幫助我們拆解,直接按回車,讓AutoGPT自動(dòng)拆解任務(wù)即可。

接著程序會(huì)自動(dòng)爬取這篇文章的內(nèi)容,然后使用gpt-3.5-turbo模型來(lái)進(jìn)行分析:

Goal 1:   
Using memory of type:  LocalCache  
Using Browser:  chrome  
  Token limit: 4000  
  Memory Stats: (0, (0, 1536))  
  Token limit: 4000  
  Send Token Count: 936  
  Tokens remaining for response: 3064  
  ------------ CONTEXT SENT TO AI ---------------  
  System: The current time and date is Mon Apr 17 20:29:37 2023  
    
  System: This reminds you of these events from your past:  
  
  
  
    
  User: Determine which next command to use, and respond using the format specified above:  
    
  ----------- END OF CONTEXT ----------------  
Creating chat completion with model gpt-3.5-turbo, temperature 0.0, max_tokens 3064  
The JSON object is valid.  
 THOUGHTS:  Let's start by browsing the article at https://v3u.cn/a_id_303 to get a better understanding of its contents.  
REASONING:  Browsing the article will allow us to analyze its contents and determine the appropriate next steps.  
PLAN:   
-  Browse the article  
-  Analyze its contents  
-  Determine the appropriate next steps  
CRITICISM:  None  
NEXT ACTION:  COMMAND = browse_website ARGUMENTS = {'url': 'https://v3u.cn/a_id_303', 'question': 'analyze the contents of the article'}  
Enter 'y' to authorise command, 'y -N' to run N continuous commands, 'n' to exit program, or enter feedback for ...  
Input:y  
-=-=-=-=-=-=-= COMMAND AUTHORISED BY USER -=-=-=-=-=-=-=   
[WDM] - Downloading: 100%|████████████████████████████████████████████| 8.04M/8.04M [00:03<00:00, 2.42MB/s]  
Text length: 6977 characters  
Adding chunk 1 / 1 to memory  
Summarizing chunk 1 / 1  
Creating chat completion with model gpt-3.5-turbo, temperature 0.0, max_tokens 300  
SYSTEM:  Command browse_website returned: Error: This model's maximum context length is 4097 tokens. However, you requested 4339 tokens (4039 in the messages, 300 in the completion). Please reduce the length of the messages or completion.  
  Token limit: 4000  
  Memory Stats: (2, (2, 1536))  
  Token limit: 4000  
  Send Token Count: 1472  
  Tokens remaining for response: 2528  
  ------------ CONTEXT SENT TO AI ---------------  
  System: The current time and date is Mon Apr 17 20:30:19 2023  
    
  System: This reminds you of these events from your past:  
['Assistant Reply: {\n    "thoughts": {\n        "text": "Let\'s start by browsing the article at https://v3u.cn/a_id_303 to get a better understanding of its contents.",\n        "reasoning": "Browsing the article will allow us to analyze its contents and determine the appropriate next steps.",\n        "plan": "- Browse the article\\n- Analyze its contents\\n- Determine the appropriate next steps",\n        "criticism": "None",\n        "speak": "I suggest we start by browsing the article at the given URL to analyze its contents and determine the appropriate next steps."\n    },\n    "command": {\n        "name": "browse_website",\n        "args": {\n            "url": "https://v3u.cn/a_id_303",\n            "question": "analyze the contents of the article"\n        }\n    }\n} \nResult: Command browse_website returned: Error: This model\'s maximum context length is 4097 tokens. However, you requested 4339 tokens (4039 in the messages, 300 in the completion). Please reduce the length of the messages or completion. \nHuman Feedback: GENERATE NEXT COMMAND JSON ']  
  
  
    
  User: Determine which next command to use, and respond using the format specified above:  
    
  Assistant: {  
    "thoughts": {  
        "text": "Let's start by browsing the article at https://v3u.cn/a_id_303 to get a better understanding of its contents.",  
        "reasoning": "Browsing the article will allow us to analyze its contents and determine the appropriate next steps.",  
        "plan": "- Browse the article\n- Analyze its contents\n- Determine the appropriate next steps",  
        "criticism": "None",  
        "speak": "I suggest we start by browsing the article at the given URL to analyze its contents and determine the appropriate next steps."  
    },  
    "command": {  
        "name": "browse_website",  
        "args": {  
            "url": "https://v3u.cn/a_id_303",  
            "question": "analyze the contents of the article"  
        }  
    }  
}  
    
    
  User: Determine which next command to use, and respond using the format specified above:  
    
  ----------- END OF CONTEXT ----------------  
Creating chat completion with model gpt-3.5-turbo, temperature 0.0, max_tokens 2528

最后將分析結(jié)果寫入goal.txt文件:

這篇文章主要闡釋了蘋果Mac電腦可以完成機(jī)器學(xué)習(xí)和深度學(xué)習(xí)任務(wù),并且通過(guò)深度學(xué)習(xí)框架Tensorflow的安裝和運(yùn)行進(jìn)行了佐證,同時(shí)也對(duì)Tensorflow的CPU和GPU的兩種模型訓(xùn)練模式進(jìn)行了深度對(duì)比和測(cè)試。

一氣呵成,流暢絲滑。

結(jié)語(yǔ)

AutoGPT和其他 AI 程序的不同之處在于,它專門專注于在無(wú)需人工干預(yù)的情況下生成提示和自動(dòng)執(zhí)行多步驟任務(wù)。它還具有掃描互聯(lián)網(wǎng)或在用戶計(jì)算機(jī)上執(zhí)行命令以獲取信息的能力,這使其有別于可能僅依賴于預(yù)先存在的數(shù)據(jù)集的其他人工智能程序。

AutoGPT的底層邏輯并不復(fù)雜:先通過(guò)搜索引擎檢索任務(wù),然后把結(jié)果和目標(biāo)丟給gpt讓它給出序列化方案json,再把方案分段丟給gpt,最后用shell去創(chuàng)建Python文件+json.load并且執(zhí)行,是一個(gè)反復(fù)遞歸的過(guò)程。

不能否認(rèn)的是,雖然實(shí)現(xiàn)邏輯簡(jiǎn)單,但這無(wú)疑是一種“自我進(jìn)化”的過(guò)程,相信隨著時(shí)間的推移,AutoGPT可以更好地處理愈加復(fù)雜的任務(wù)。文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-417162.html

到了這里,關(guān)于任務(wù)拆解,悠然自得,自動(dòng)版本的ChatGPT,AutoGPT自動(dòng)人工智能AI任務(wù)實(shí)踐(Python3.10)的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • 拆解Spring boot:Springboot為什么如此絲滑而簡(jiǎn)單?源碼剖析解讀自動(dòng)裝配

    拆解Spring boot:Springboot為什么如此絲滑而簡(jiǎn)單?源碼剖析解讀自動(dòng)裝配

    ????歡迎光臨,終于等到你啦???? ??我是蘇澤,一位對(duì)技術(shù)充滿熱情的探索者和分享者。???? ??持續(xù)更新的專欄 《Spring 狂野之旅:從入門到入魔》 ?? 本專欄帶你從Spring入門到入魔 ? 這是蘇澤的個(gè)人主頁(yè)可以看到我其他的內(nèi)容哦???? 努力的蘇澤 http://suzee.blog.csdn

    2024年03月23日
    瀏覽(24)
  • 三星引入ChatGPT半個(gè)月泄密3次;MidJourney V5相機(jī)鏡頭完整參數(shù)列表;萬(wàn)字長(zhǎng)文,拆解投身大模型3個(gè)本質(zhì)問(wèn)題 | ShowMeAI日?qǐng)?bào)

    三星引入ChatGPT半個(gè)月泄密3次;MidJourney V5相機(jī)鏡頭完整參數(shù)列表;萬(wàn)字長(zhǎng)文,拆解投身大模型3個(gè)本質(zhì)問(wèn)題 | ShowMeAI日?qǐng)?bào)

    ?? 日?qǐng)?bào)周刊合集 | ?? 生產(chǎn)力工具與行業(yè)應(yīng)用大全 | ?? 點(diǎn)贊關(guān)注評(píng)論拜托啦! 據(jù)韓國(guó)媒體報(bào)道,三星電子 (Samsung Electronics) 自3月11日引入 ChatGPT 后, 在不到20天的時(shí)間里發(fā)生了三起機(jī)密信息泄漏事件 ,其中2起與半導(dǎo)體設(shè)備測(cè)量數(shù)據(jù)、產(chǎn)品良率等機(jī)密信息有關(guān),另外1起與會(huì)

    2023年04月09日
    瀏覽(27)
  • Java定時(shí)任務(wù)、自動(dòng)化任務(wù)調(diào)度

    Java提供了多種方式來(lái)實(shí)現(xiàn)定時(shí)任務(wù),使得開發(fā)人員能夠在指定的時(shí)間間隔或固定時(shí)間點(diǎn)執(zhí)行特定的任務(wù)。本文將介紹Java中實(shí)現(xiàn)定時(shí)任務(wù)的幾種常用方法,并探討它們的優(yōu)勢(shì)和適用場(chǎng)景。 Java中的Timer類是最早引入的定時(shí)任務(wù)工具,它可以用于執(zhí)行一次性或重復(fù)性的定時(shí)任務(wù)。

    2024年02月16日
    瀏覽(37)
  • ChatGPT 最佳實(shí)踐指南之:將復(fù)雜任務(wù)拆分為較簡(jiǎn)單的子任務(wù)

    Split complex tasks into simpler subtasks 將復(fù)雜任務(wù)分解為較簡(jiǎn)單的子任務(wù) Just as it is good practice in software engineering to decompose a complex system into a set of modular components, the same is true of tasks submitted to GPTs. Complex tasks tend to have higher error rates than simpler tasks. Furthermore, complex tasks can often be re-de

    2024年02月15日
    瀏覽(17)
  • 2023最新版本Activiti7系列-任務(wù)分配

    2023最新版本Activiti7系列-任務(wù)分配

    ??在指派 用戶任務(wù) 的審批人時(shí)。我們是直接指派的固定賬號(hào)。但是為了保證流程設(shè)計(jì)審批的靈活性。我們需要各種不同的分配方式,所以這節(jié)我們就詳細(xì)的來(lái)介紹先在Activiti7中我們可以使用的相關(guān)的分配方式. ??固定分配就是我們前面介紹的,在繪制流程圖或者直接在流

    2024年02月09日
    瀏覽(26)
  • 【學(xué)習(xí)日記】【FreeRTOS】任務(wù)調(diào)度時(shí)如何考慮任務(wù)優(yōu)先級(jí)——任務(wù)的自動(dòng)切換

    【學(xué)習(xí)日記】【FreeRTOS】任務(wù)調(diào)度時(shí)如何考慮任務(wù)優(yōu)先級(jí)——任務(wù)的自動(dòng)切換

    本文開始為 RTOS 加入考慮任務(wù)優(yōu)先級(jí)的自動(dòng)調(diào)度算法,代碼大部分參考野火。 本文主要是一篇學(xué)習(xí)筆記,加入了筆者自己對(duì)野火代碼的梳理和理解。 首先我們要知道,在 RTOS 中,優(yōu)先級(jí)越高、越需要被先執(zhí)行的的任務(wù)的優(yōu)先級(jí)的數(shù)字越大。比如優(yōu)先級(jí)數(shù)字為 5 的任務(wù)就要比

    2024年02月12日
    瀏覽(23)
  • 4個(gè)簡(jiǎn)化IT服務(wù)臺(tái)任務(wù)的ChatGPT功能

    4個(gè)簡(jiǎn)化IT服務(wù)臺(tái)任務(wù)的ChatGPT功能

    最近幾個(gè)月,ChatGPT 風(fēng)靡全球,這是一個(gè) AI 聊天機(jī)器人,使用戶能夠生成腳本、文章、鍛煉圖表等。這項(xiàng)技術(shù)在各行各業(yè)都有無(wú)窮無(wú)盡的應(yīng)用,在本文中,我們將研究這種現(xiàn)代技術(shù)如何幫助服務(wù)臺(tái)團(tuán)隊(duì)增強(qiáng)服務(wù)交付和客戶體驗(yàn)。 什么是ChatGPT和LLM? ChatGPT 是由 OpenAI 開發(fā)的一種

    2024年02月12日
    瀏覽(14)
  • Win11集成 ChatGPT,任務(wù)欄取消分組真的回來(lái)了

    Win11集成 ChatGPT,任務(wù)欄取消分組真的回來(lái)了

    時(shí)隔兩月微軟如期發(fā)布了 Win11 Moments 3 更新,版本號(hào) 22621.1778 。 微軟這次更新帶來(lái)了許多質(zhì)量更新和功能改進(jìn)。 直觀的改動(dòng)是任務(wù)欄,網(wǎng)絡(luò)圖標(biāo)在連接加密隧道時(shí)會(huì)上鎖,時(shí)間顯示到秒也重新回歸。 日常會(huì)用到的 Alt+Tab 任務(wù)選項(xiàng)卡被限制到最多20個(gè),可能是因?yàn)樾阅茉颉?/p>

    2024年02月07日
    瀏覽(14)
  • 使用 Crontab 自動(dòng)化任務(wù)調(diào)度

    在計(jì)算機(jī)工作中,我們經(jīng)常需要自動(dòng)執(zhí)行某些任務(wù)。Crontab 是一個(gè)在 Linux 和類 Unix 系統(tǒng)上廣泛使用的工具,它允許用戶按照預(yù)定的時(shí)間表觸發(fā)指定的命令和腳本。無(wú)論是備份數(shù)據(jù)、生成報(bào)告還是定期清理臨時(shí)文件,Crontab 都可以幫助我們自動(dòng)化這些任務(wù),提高工作效率。 Cro

    2024年02月09日
    瀏覽(21)
  • 【AIGC】利用ChatGPT完成任務(wù),迷你AGI控制世界來(lái)了

    【AIGC】利用ChatGPT完成任務(wù),迷你AGI控制世界來(lái)了

    多智能體代碼庫(kù) CAMEL,提出了通過(guò)角色扮演框架來(lái)研究 LLM 智能體的行為和能力。 未來(lái)的社會(huì)會(huì)被通用人工智能(AGI)控制嗎?當(dāng)擁有多個(gè) ChatGPT 智能體會(huì)有多可怕。 ChatGPT 已經(jīng)初步展現(xiàn)了 AGI 的雛形,成為了各行各業(yè)工作人員的全能小助手,但如果任由其野蠻生長(zhǎng),不加于

    2024年02月07日
    瀏覽(26)

覺(jué)得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包