PHPackages                             particle-academy/prism-perplexity - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Search &amp; Filtering](/categories/search)
4. /
5. particle-academy/prism-perplexity

ActiveLibrary[Search &amp; Filtering](/categories/search)

particle-academy/prism-perplexity
=================================

The rest of the Perplexity API for Prism — embeddings, direct search, and async deep research beyond the Agent API chat surface.

v0.1.0(yesterday)02↑2900%MITPHPPHP ^8.2CI passing

Since Aug 25Pushed todayCompare

[ Source](https://github.com/Particle-Academy/prism-perplexity)[ Packagist](https://packagist.org/packages/particle-academy/prism-perplexity)[ RSS](/packages/particle-academy-prism-perplexity/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (6)Versions (2)Used By (0)

Prism Perplexity
================

[](#prism-perplexity)

The rest of the Perplexity API for [Prism](https://github.com/Particle-Academy/prism) — embeddings, direct web search, and the endpoints that do not fit Prism's provider abstraction.

```
composer require particle-academy/prism-perplexity
```

That is the whole setup. The package registers under the **same provider key** as Prism core, so `using('perplexity', …)` gains capabilities and nothing that already worked changes.

Embeddings
----------

[](#embeddings)

Prism core throws `unsupportedProviderAction` for Perplexity embeddings. With this installed:

```
$response = Prism::embeddings()
    ->using('perplexity', 'text-embedding-v1')
    ->fromInput('The quick brown fox')
    ->asEmbeddings();

$response->embeddings[0]->embedding;  // float[]
```

### Contextualized embeddings

[](#contextualized-embeddings)

Perplexity has a second endpoint for chunks of **one document**, embedding each in light of the others — which is what you want when you have split a document for retrieval and do not want every chunk to read as though it arrived alone.

Prism's embeddings abstraction is text-in/vector-out and has no concept of "these belong together", so it is reached explicitly rather than inferred:

```
Prism::embeddings()
    ->using('perplexity', 'text-embedding-v1')
    ->fromArray($chunks)
    ->withProviderOptions(['contextualized' => true])
    ->asEmbeddings();
```

Vectors are ordered by the `index` the API returns, not by array position — lining vectors up with the inputs that produced them by position would be a silent mismatch if a response ever arrived out of order.

Search
------

[](#search)

Web results with **no model in the loop** — the sources a grounded answer would have been built from, without paying for the answer.

```
$provider = app(PrismManager::class)->resolve('perplexity');

$results = $provider->search('what is prism php', [
    'max_results' => 5,
    'search_domain_filter' => ['github.com'],
]);
```

This is not a `Prism::` verb because Prism has no "search" concept — every other provider it speaks to answers with a model. Bending a list of web results into a completion would lose the structure that makes it worth having, so it is its own method.

An empty result list is an **answer**, not a failure.

What lives here and what lives in core
--------------------------------------

[](#what-lives-here-and-what-lives-in-core)

WhereText, structured output, streamingPrism coreSlug→preset translation, Agent API transportPrism coreEmbeddings, contextualized embeddingshereSearch APIhereAsync deep researchplannedThe split follows the abstraction: core carries what fits "prompt in, answer out". Anything that is a genuinely different operation lives out here rather than distorting core to fit.

Errors
------

[](#errors)

Perplexity's agent surface returns failures inside an HTTP 200. This package assumes the same is possible on every endpoint and branches on the response body, because an empty vector set or an empty result list read as a valid answer is worse than an exception.

Requirements
------------

[](#requirements)

PHP 8.2+, Laravel 12.61+ or 13.12+, and `particle-academy/prism` 0.113+.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance100

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/461446?v=4)[Wish Born](/maintainers/wishborn)[@wishborn](https://github.com/wishborn)

---

Top Contributors

[![wishborn](https://avatars.githubusercontent.com/u/461446?v=4)](https://github.com/wishborn "wishborn (1 commits)")

---

Tags

searchlaravelaiprismllmperplexityembeddings

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/particle-academy-prism-perplexity/health.svg)

```
[![Health](https://phpackages.com/badges/particle-academy-prism-perplexity/health.svg)](https://phpackages.com/packages/particle-academy-prism-perplexity)
```

###  Alternatives

[vizra/vizra-adk

Vizra Agent Development Kit - A comprehensive Laravel package for building intelligent AI agents.

29636.7k](/packages/vizra-vizra-adk)[api-platform/laravel

API Platform support for Laravel

58190.1k21](/packages/api-platform-laravel)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21327.3k4](/packages/ecotone-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
