定制 pport/autogpt 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pport/autogpt

Composer 安装命令:

composer require pport/autogpt

包简介

Pport AutoGpt is a PHP class that uses LLM to automate task creation based on an objective.The class generates initial tasks based on the objective, executes those tasks, generates new tasks based on the results, and reprioritizes tasks based on the most recent task completed.

README 文档

README

PHP-AutoGpt is a simple class implementation designed to showcase capabilities of LLMs in tasks creation and automation. The class generates initial tasks based on the objective, executes those tasks, generates new tasks based on the results, and reprioritizes tasks based on the most recent task completed.

Usage

First, you will need an API key. You can obtain one from your OpenAI. Once you have your key, include it when constructing the class.

$autogpt = new Pport\AutoGpt();
$agent->setApiKey('OPENAI_KEY');
$agent->setObjective("Create A Blog Post bout Artificial Intelligence");
$agent->setInitialTask("Research the best ideas");
$agent->run();

The run() method will loop through each task until the objective is reached. It will automatically generate new tasks based on the results of the previous task and prioritize the tasks accordingly.

Methods

__construct($objective,$initialTask, $apiKey)

Constructs the AutoGpt class with the given $objective and $apiKey.

run()

Generates first task if none exists and then recursively executes the list of tasks until the objective is reached.

generateObjectiveTasks()

Generates the initial list of tasks based on the given objective.

executeTask()

Executes the given task.

createNewTasks()

Generates new tasks based on the result of the previous task.

prioritizeTasks()

Prioritizes the list of tasks based on the given current task.

sendRequest($prompt)

Sends a request to the GPT-3 API with the given prompt.|

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2023-04-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固