经 AI Skill Hub 精选评估,Prisma PHP LLM多媒体集成包 获评「推荐使用」。这款AI工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 6.8 分,适合有一定技术背景的用户使用。
轻量级PHP包,专为集成多媒体相关的大型语言模型而设计。提供简洁的API接口,支持图片、音视频等多媒体内容处理,适合PHP开发者快速构建AI应用和LLM集成方案。
Prisma PHP LLM多媒体集成包 是一款基于 PHP 开发的开源工具,专注于 PHP、LLM、多媒体 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
轻量级PHP包,专为集成多媒体相关的大型语言模型而设计。提供简洁的API接口,支持图片、音视频等多媒体内容处理,适合PHP开发者快速构建AI应用和LLM集成方案。
Prisma PHP LLM多媒体集成包 是一款基于 PHP 开发的开源工具,专注于 PHP、LLM、多媒体 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 克隆仓库 git clone https://github.com/aimeos/prisma cd prisma # 查看安装说明 cat README.md # 按 README 完成环境依赖安装后即可使用
# 查看帮助 prisma --help # 基本运行 prisma [options] <input> # 详细使用说明请查阅文档 # https://github.com/aimeos/prisma
# prisma 配置说明 # 查看配置选项 prisma --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export PRISMA_CONFIG="/path/to/config.yml"
Light-weight PHP package for integrating multi-media and text related Large Language Models (LLMs) into your applications using a unified interface.
<nav> <div class="method-header"><a href="#supported-providers">Supported providers</a></div> <ul class="method-list"> <li><a href="#audio">Audio</a></li> <li><a href="#image">Image</a></li> <li><a href="#text">Text</a></li> <li><a href="#video">Video</a></li> </ul> <div class="method-header"><a href="#api-usage">API usage</a></div> <ul class="method-list"> <li><a href="#ensure">ensure</a><span>: Ensures that the provider has implemented the method</span></li> <li><a href="#has">has</a><span>: Tests if the provider has implemented the method</span></li> <li><a href="#model">model</a><span>: Use the model passed by its name</span></li> <li><a href="#withClientOptions">withClientOptions</a><span>: Add options for the Guzzle HTTP client</span></li> <li><a href="#withClientRetry">withClientRetry</a><span>: Configure automatic retry for failed HTTP requests</span></li> <li><a href="#withSystemPrompt">withSystemPrompt</a><span>: Add a system prompt for the LLM</span></li> <li><a href="#withMaxTokens">withMaxTokens</a><span>: Set the maximum number of output tokens</span></li> <li><a href="#withThinkingBudget">withThinkingBudget</a><span>: Set the thinking/reasoning budget in tokens</span></li> <li><a href="#response-objects">Response objects</a><span>: How data is returned by the API</span></li> <li><a href="#citations">Citations</a><span>: Source references from provider responses</span></li> <li><a href="#finish-reason">Finish reason</a><span>: Why generation stopped</span></li> <li><a href="#tool-steps">Tool steps</a><span>: Inspect tool call history</span></li> <li><a href="#rate-limit">Rate limit</a><span>: Rate limit information from providers</span></li> </ul> <div class="method-header"><a href="#schemas">Schemas</a></div> <ul class="method-list"> <li><a href="#building-schemas">Building schemas</a><span>: Define tool parameters using the fluent Schema builder</span></li> <li><a href="#from-arrays">From arrays</a><span>: Create schemas from JSON Schema arrays</span></li> <li><a href="#type-reference">Type reference</a><span>: Available types and their methods</span></li> </ul> <div class="method-header"><a href="#tools">Tools</a></div> <ul class="method-list"> <li><a href="#creating-tools">Creating tools</a><span>: Create tools using the Tools facade</span></li> <li><a href="#provider-tools">Provider tools</a><span>: Built-in tools executed server-side</span></li> <li><a href="#tool-state">Tool state</a><span>: Check a tool's remaining call budget</span></li> <li><a href="#error-handling">Error handling</a><span>: Customize how tool errors are returned</span></li> <li><a href="#concurrent-tools">Concurrent tools</a><span>: Run tools in parallel</span></li> <li><a href="#decorating-tools">Decorating tools</a><span>: Wrap tools with additional behavior</span></li> </ul> <div class="method-header"><a href="#audio-api">Audio API</a></div> <ul class="method-list"> <li><a href="#demix">demix</a><span>: Separate an audio file into its individual tracks</span></li> <li><a href="#denoise">denoise</a><span>: Remove noise from an audio file</span></li> <li><a href="#describe">describe</a><span>: Describe the content of an audio file</span></li> <li><a href="#revoice">revoice</a><span>: Exchange the voice in an audio file</span></li> <li><a href="#speak">speak</a><span>: Convert text to speech in an audio file</span></li> <li><a href="#transcribe">transcribe</a><span>: Converts speech of an audio file to text</span></li> </ul> <div class="method-header"><a href="#image-api">Image API</a></div> <ul class="method-list"> <li><a href="#background">background</a><span>: Replace background according to the prompt</span></li> <li><a href="#describe">describe</a><span>: Describe the content of an image</span></li> <li><a href="#detext">detext</a><span>: Remove all text from the image</span></li> <li><a href="#erase">erase</a><span>: Erase parts of the image</span></li> <li><a href="#imagine">imagine</a><span>: Generate an image from the prompt</span></li> <li><a href="#inpaint">inpaint</a><span>: Edit an image area according to a prompt</span></li> <li><a href="#isolate">isolate</a><span>: Remove the image background</span></li> <li><a href="#relocate">relocate</a><span>: Place the foreground object on a new background</span></li> <li><a href="#repaint">repaint</a><span>: Repaint an image according to the prompt</span></li> <li><a href="#uncrop">uncrop</a><span>: Extend/outpaint the image</span></li> <li><a href="#upscale">upscale</a><span>: Scale up the image</span></li> <li><a href="#vectorize">vectorize</a><span>: Creates embedding vectors from images</span></li> </ul> <div class="method-header"><a href="#text-api">Text API</a></div> <ul class="method-list"> <li><a href="#structure">structure</a><span>: Generate structured output from a prompt and schema</span></li> <li><a href="#translate">translate</a><span>: Translate texts from one language to another</span></li> <li><a href="#write">write</a><span>: Generate text from the given prompt</span></li> </ul> <div class="method-header"><a href="#video-api">Video API</a></div> <ul class="method-list"> <li><a href="#describe">describe</a><span>: Describe the content of a video</span></li> </ul> <div class="method-header"><a href="#custom-providers">Custom providers</a></div> <ul class="method-list"> <li><a href="#base-skeleton">Base skeleton</a><span>: Basic structure for a custom provider</span></li> <li><a href="#requests">Requests</a><span>: Support methods for building HTTP requests</span></li> <li><a href="#responses">Responses</a><span>: Available response types and their usage</span></li> <li><a href="#examples">Examples</a><span>: Full provider implementation examples</span></li> </ul> </nav>
composer req aimeos/prisma
Use the fluent Schema builder to define tool parameters:
use Aimeos\Prisma\Schema\Schema;
$schema = Schema::for( 'search', [
'query' => Schema::string()->description( 'Search query' )->required(),
'limit' => Schema::integer()->description( 'Max results' )->min( 1 )->max( 100 ),
] );
Schema::for() creates a named schema with an object type. The first argument is the schema name, the second is an associative array of property names to types.
Nested objects:
$schema = Schema::for( 'create_event', [
'title' => Schema::string()->required(),
'location' => Schema::object( [
'city' => Schema::string()->required(),
'country' => Schema::string(),
] )->required(),
] );
Arrays:
$schema = Schema::for( 'tag', [
'tags' => Schema::array()->items( Schema::string() )->min( 1 )->max( 10 )->required(),
'scores' => Schema::array()->items( Schema::number() ),
] );
Enums:
$schema = Schema::for( 'sort', [
'order' => Schema::string()->enum( ['asc', 'desc'] )->required(),
] );
// Or from a BackedEnum:
$schema = Schema::for( 'sort', [
'order' => Schema::string()->enum( SortOrder::class )->required(),
] );
Strict mode and no additional properties (for providers that support it, e.g. OpenAI):
$schema = Schema::for( 'search', [
'query' => Schema::string()->required(),
] )->strict()->withoutAdditionalProperties();
Basic usage:
use Aimeos\Prisma\Prisma;
$image = Prisma::image()
->using( '<provider>', ['api_key' => 'xxx'])
->model( '<modelname>' ) // if model can be selected
->ensure( 'imagine' ) // make sure interface is implemented
->imagine( 'a grumpy cat' )
->binary();
$texts = Prisma::text()
->using( 'deepl', ['api_key' => 'xxx'])
->ensure( 'translate' )
->translate( ['Hello'], 'de' )
->texts();
Add options for the Guzzle HTTP client.
public function withClientOptions( array `$options` ) : self
$options Associative list of name/value pairsExample:
\Aimeos\Prisma\Prisma::image()
->using( '<provider>', ['api_key' => 'xxx'])
->withClientOptions( ['timeout' => 120] );
All types support these common methods: description(), required(), nullable(), title(), enum().
| Factory method | Type | Additional methods |
|---|---|---|
Schema::string() | String | min(), max(), pattern(), format(), default() |
Schema::integer() | Integer | min(), max(), multipleOf(), default() |
Schema::number() | Number (float) | min(), max(), multipleOf(), default() |
Schema::boolean() | Boolean | default() |
Schema::array() | Array | items(), min(), max(), unique(), default() |
Schema::object() | Object | withoutAdditionalProperties(), default() |
Most methods require an image object as input which contains a reference to the image that should be processed. This object can be created by:
use \Aimeos\Prisma\Files\Image;
$image = Image::fromUrl( 'https://example.com/image.php', 'image/png' );
$image = Image::fromLocalPath( 'path/to/image.png', 'image/png' );
$image = Image::fromBinary( 'PNG...', 'image/png' );
$image = Image::fromBase64( 'UE5H...', 'image/png' );
// Laravel only:
$image = Image::fromStoragePath( 'path/to/image.png', 'public', 'image/png' );
The last parameter of all methods (mime type) is optional. If it's not passed, the file content will be retrieved to determine the mime type if reqested.
Note: It's best to use fromUrl() if possible because all other formats (binary and base64) can be derived from the URL content but URLs can't be created from binary/base64 data.
轻量级设计适合PHP生态,��注多媒体LLM集成具有差异化优势。但用户基数小,文档完整度待评。
该工具使用 LGPL-2.1 协议,商用场景请仔细阅读协议条款,必要时咨询法律意见。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
⚠️ LGPL 2.1 — 弱 Copyleft,可动态链接到商业软件,但修改库本身须开源。
AI Skill Hub 点评:Prisma PHP LLM多媒体集成包 的核心功能完整,质量良好。对于AI 技术爱好者来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | prisma |
| 原始描述 | 开源AI工具:Light-weight PHP package for integrating multi-media related Large Language Mode。⭐166 · PHP |
| Topics | PHPLLM多媒体API轻量级 |
| GitHub | https://github.com/aimeos/prisma |
| License | LGPL-2.1 |
| 语言 | PHP |
收录时间:2026-05-21 · 更新时间:2026-05-23 · License:LGPL-2.1 · AI Skill Hub 不对第三方内容的准确性作法律背书。