Skip to content

feat(server): add multimodal support to PrismServer API endpoints#403

Merged
sixlive merged 4 commits intoprism-php:mainfrom
sv-LayZ:feat/server-multimodal
Jun 21, 2025
Merged

feat(server): add multimodal support to PrismServer API endpoints#403
sixlive merged 4 commits intoprism-php:mainfrom
sv-LayZ:feat/server-multimodal

Conversation

@sv-LayZ
Copy link
Contributor

@sv-LayZ sv-LayZ commented Jun 11, 2025

Description

Add support for OpenAI-compatible multimodal messages in PrismChatController
The endpoint now handles image content alongside text in chat completions

Changes include:

  • Parse OpenAI format multimodal messages (text + image_url types)
  • Support both URL-based and base64-encoded images
  • Convert image_url parts to Prism Image value objects
  • Maintain backward compatibility with existing text-only messages
  • Add comprehensive test coverage for multimodal scenarios

The implementation follows OpenAI's message format for seamless integration
with existing OpenAI-compatible clients while leveraging Prism's native
multimodal capabilities

Breaking Changes

None

Copy link
Contributor

@sixlive sixlive left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sick! Thanks!!

@kinsta
Copy link

kinsta bot commented Jun 12, 2025

Preview deployments for prism ⚡️

Status Branch preview Commit preview
❌ Failed to deploy N/A N/A

Commit: d9bb489c2b26968a992836b0b79e3dd3d93e59a6

Deployment ID: 28f8d5ac-a9a2-4ff8-b321-787c44654ba3

Static site name: prism-97nz9

@sv-LayZ
Copy link
Contributor Author

sv-LayZ commented Jun 18, 2025

can't reproduce the test error. I'm open to any help

@sixlive
Copy link
Contributor

sixlive commented Jun 20, 2025

I cant either, I'll dig in and try and figure it out soon

@sixlive sixlive merged commit 19b5415 into prism-php:main Jun 21, 2025
14 checks passed
@sv-LayZ sv-LayZ deleted the feat/server-multimodal branch July 2, 2025 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants