Skip to content

Conversation

RamyHakam
Copy link
Contributor

@RamyHakam RamyHakam commented Sep 12, 2025

Q A
Bug fix? yes
New feature? yes
Docs? no
Issues Fix #326
License MIT

Description

Implements event-based input processing to resolve fatal errors when string payloads are passed to ModelClient implementations using array_merge($payload, $options).

Solution:

  • PlatformInvokationEvent: Dispatched before platform invocation
  • StringToMessageBagListener: Converts strings to MessageBag for models with INPUT_MESSAGES capability
  • Enables simple usage: $platform->invoke($model, 'Hello')

Backward Compatible: EventDispatcher is optional, existing code unchanged.

@carsonbot carsonbot added Bug Something isn't working Feature New feature Platform Issues & PRs about the AI Platform component Status: Needs Review labels Sep 12, 2025
@chr-hertel chr-hertel added the Hackathon 2025 This issue or pull request was part of the Symfony AI Hackathon 2025 label Sep 13, 2025
@chr-hertel chr-hertel force-pushed the feature/platform-input-event-system branch from 5a3dcaf to e852ce8 Compare October 10, 2025 23:02
Copy link
Member

@chr-hertel chr-hertel left a comment

Choose a reason for hiding this comment

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

Took me a while to come back to you, but took care of rebase and style changes we had.

Thanks @RamyHakam!

@chr-hertel chr-hertel force-pushed the feature/platform-input-event-system branch from 0f277e6 to c5e362d Compare October 10, 2025 23:08
@chr-hertel
Copy link
Member

It took time, but here we go, this is in now. Thank you very much @RamyHakam.

@chr-hertel chr-hertel merged commit 10b13d3 into symfony:main Oct 10, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working Feature New feature Hackathon 2025 This issue or pull request was part of the Symfony AI Hackathon 2025 Platform Issues & PRs about the AI Platform component Status: Reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Platform] Fatal Error: array_merge() called with string payload in ModelClient implementations

3 participants