Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.

feat: allow JsonSerializable objects in contract #377

Merged

Conversation

DZunke
Copy link
Contributor

@DZunke DZunke commented Jul 5, 2025

As brought up in #371 it could be a possible extension point to the contract to reintroduce the support for JsonSerializable objects when there are no normalizers for an object.

So it would be a possible alternative for custom MessageBagInterface, MessageInterface, ContentInterface, etc. by allowing them to implement the JsonSerializable interface.

@DZunke DZunke force-pushed the allow-json-serializable-objects-in-contract branch from 326a130 to 052e287 Compare July 5, 2025 08:51
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.

Yuuup, exactly what I meant - thanks @DZunke! 🙏

@chr-hertel chr-hertel merged commit 3460407 into php-llm:main Jul 5, 2025
7 checks passed
@OskarStark
Copy link
Contributor

Release needed 😅

chr-hertel added a commit to symfony/ai that referenced this pull request Jul 6, 2025
This PR was merged into the main branch.

Discussion
----------

feat: allow JsonSerializable objects in contract

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| Docs?         | no
| Issues        |
| License       | MIT

Cherry picking php-llm/llm-chain#377

Commits
-------

9dde800 feat: allow JsonSerializable objects in contract (#377)
symfony-splitter pushed a commit to symfony/ai-platform that referenced this pull request Jul 11, 2025
This PR was merged into the main branch.

Discussion
----------

feat: allow JsonSerializable objects in contract

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| Docs?         | no
| Issues        |
| License       | MIT

Cherry picking php-llm/llm-chain#377

Commits
-------

9dde800 feat: allow JsonSerializable objects in contract (#377)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants