Commit 4231927
committed
feat(replicate): add complete Replicate provider with all features
Add comprehensive Replicate provider implementation supporting all core features:
text generation, streaming (SSE), structured output, embeddings, image generation,
audio (TTS/STT), and tool calling with multi-step execution.
Features:
- Text generation with system prompts and conversation history
- Real-time SSE streaming with automatic fallback to simulated streaming
- Tool calling via prompt engineering with JSON parsing
- Structured output with JSON schema validation
- Image generation (FLUX, Stable Diffusion XL, etc.)
- Text-to-Speech with multiple voices (Kokoro-82m)
- Speech-to-Text with Whisper (WAV, MP3, FLAC, OGG, M4A)
- Embeddings (single and batch, 768-dimensional vectors)
Implementation:
- Async prediction management with configurable polling
- Sync mode (Prefer: wait header) for lower latency
- Comprehensive error handling with typed exceptions
- Full PHPStan level 8 compliance
- 44 tests with 132 assertions (100% feature coverage)
- 455 lines of comprehensive documentation
Files changed: 73 files, 5,360+ lines added1 parent a5540b0 commit 4231927
File tree
73 files changed
+5360
-0
lines changed- config
- docs
- .vitepress
- components
- getting-started
- providers
- src
- Enums
- Providers/Replicate
- Concerns
- Handlers
- Maps
- ValueObjects
- tests
- Fixtures/replicate
- Providers/Replicate
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
73 files changed
+5360
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
62 | 70 | | |
63 | 71 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
206 | 214 | | |
207 | 215 | | |
208 | 216 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
330 | 342 | | |
331 | 343 | | |
332 | 344 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
63 | 76 | | |
64 | 77 | | |
65 | 78 | | |
| |||
92 | 105 | | |
93 | 106 | | |
94 | 107 | | |
| 108 | + | |
95 | 109 | | |
96 | 110 | | |
97 | 111 | | |
| |||
0 commit comments