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

Conversation

@valtzu
Copy link
Contributor

@valtzu valtzu commented Jul 10, 2025

Example:

$ php examples/google/grounding.php
Symfony is an open-source PHP framework designed to accelerate the creation and maintenance of web applications. It provides a set of reusable PHP components and bundles that simplify complex development tasks, allowing developers to build robust and scalable applications. By promoting best practices and design patterns, Symfony gives developers full control over the application's configuration and customization.
Search queries: what is Symfony framework
Sources: wikipedia.org, ntchosting.com, symfony.com, drupalize.me

Up for discussion if it'd be better to do some extra processing (to provide a stable data structure for the user of this library) for the data or it's ok to expose as-is.


Also worth noting that I see this information as something you want to save with your chat (basically within AssistantMessage), so in that sense I'm not 100% sure if this is the correct place for this.

@chr-hertel
Copy link
Member

Great addition, was thinking if "grounding" is a vendor specific term - since you also used "sources" in the output. WDYT should we use a more general term like "sources" instead?

Copy link
Member

Choose a reason for hiding this comment

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

That's quite straight forward to test, please add one

@chr-hertel
Copy link
Member

@valtzu do you still want to work on this here or move it to symfony/ai?

@valtzu
Copy link
Contributor Author

valtzu commented Jul 15, 2025

After some thinking, I'd prefer to have this logic in the model client / response converter instead of needing to wire an additional vendor-specific output processor.

Also I want to see if this can be done for streams too.

Closing here, may get back to this later in symfony/ai

Thanks

@valtzu valtzu closed this Jul 15, 2025
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.

2 participants