定制 llphant/autophp 二次开发

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

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

llphant/autophp

Composer 安装命令:

composer require llphant/autophp

包简介

AutoPHP is a librairy to help you build Generative AI applications agents

README 文档

README

You can now make your AutoGPT clone in PHP using LLPhant.

Here is a simple example using the SerpApiSearch tool to create an autonomous PHP agent. You just need to describe the objective and add the tools you want to use. We will add more tools in the future.

Here is the simplest example:

<?php

use AutoPHP\AutoPHP;

require_once 'vendor/autoload.php';

// You describe the objective
$objective = 'what is 1+1 ?';

$autoPHP = new AutoPHP($objective, []);
$answer = $autoPHP->run();

echo $answer;

Another one using serpapi to search for information:

use LLPhant\AutoPHP;
use LLPhant\Chat\FunctionInfo\FunctionBuilder;
use LLPhant\Tool\SerpApiSearch;

require_once 'vendor/autoload.php';

// You describe the objective
$objective = 'Find the names of the wives or girlfriends of at least 2 players from the 2023 male French football team.';

// You can add tools to the agent, so it can use them. You need an API key to use SerpApiSearch
// Have a look here: https://serpapi.com
$searchApi = new SerpApiSearch();
$function = FunctionBuilder::buildFunctionInfo($searchApi, 'search');

$autoPHP = new AutoPHP($objective, [$function]);
$autoPHP->run();

Sponsor

AutoPHP is sponsored by :

  • AGO. Generative AI customer support solutions.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-03