Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ phpunit.xml
ray.php
CLAUDE.md
.phpunit.result.cache
AGENTS.md
8 changes: 8 additions & 0 deletions config/prism.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,13 @@
'x_title' => env('OPENROUTER_SITE_X_TITLE', null),
],
],
'replicate' => [
'api_key' => env('REPLICATE_API_KEY', ''),
'url' => env('REPLICATE_URL', 'https://api.replicate.com/v1'),
'webhook_url' => env('REPLICATE_WEBHOOK_URL', null),
'use_sync_mode' => env('REPLICATE_USE_SYNC_MODE', true), // Use Prefer: wait header
'polling_interval' => env('REPLICATE_POLLING_INTERVAL', 1000),
'max_wait_time' => env('REPLICATE_MAX_WAIT_TIME', 60),
],
],
];
8 changes: 8 additions & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,14 @@ export default defineConfig({
text: "OpenAI",
link: "/providers/openai",
},
{
text: "OpenRouter",
link: "/providers/openrouter",
},
{
text: "Replicate",
link: "/providers/replicate",
},
{
text: "Voyage AI",
link: "/providers/voyageai",
Expand Down
12 changes: 12 additions & 0 deletions docs/components/ProviderSupport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,18 @@ export default {
tools: Supported,
documents: Supported,
},
{
name: "Replicate",
text: Supported,
streaming: Supported,
structured: Supported,
embeddings: Supported,
image: Supported,
"speech-to-text": Supported,
"text-to-speech": Supported,
tools: Unsupported,
documents: Unsupported,
},
{
name: "VoyageAI",
text: Unsupported,
Expand Down
14 changes: 14 additions & 0 deletions docs/getting-started/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,19 @@ $response = Prism::text()
->withPrompt('Explain quantum computing to a 5-year-old.')
->asText();

echo $response->text;
```

```php [Replicate]
use Prism\Prism\Facades\Prism;
use Prism\Prism\Enums\Provider;

$response = Prism::text()
->using(Provider::Replicate, 'meta/meta-llama-3.1-405b-instruct')
->withSystemPrompt(view('prompts.system'))
->withPrompt('Explain quantum computing to a 5-year-old.')
->asText();

echo $response->text;
```
:::
Expand Down Expand Up @@ -92,6 +105,7 @@ We currently offer first-party support for these leading AI providers:
- [Mistral](/providers/mistral.md)
- [Ollama](/providers/ollama.md)
- [OpenAI](/providers/openai.md)
- [Replicate](/providers/replicate.md)
- [xAI](/providers/xai.md)

Each provider brings its own strengths to the table, and Prism makes it easy to use them all through a consistent, elegant interface.
Expand Down
Loading