Skip to content

Conversation

mathieuripert
Copy link
Contributor

@mathieuripert mathieuripert commented Jun 16, 2025

Capture Full Perplexity API Response Metadata

It enhances ChatPerplexity to capture the complete API response from Perplexity, not just the message content.
The main benefit is to get the citations and search results.

  • Full API response metadata is now available in Message.processed_content
  • Access to citations, search results, token usage, and response identifiers

@brainlid
Copy link
Owner

Hi @mathieuripert! Using processed_content as a place to store the additional information is an interesting approach!

One of the things I'm working on currently is support for NativeTools. This means web_search tools, which are also returning citations or annotations. The challenge is the variety of ways services return this data. But I'm looking for something more fully supported in ContentParts. I don't have it done yet, but I'll think more about it.

Thanks!

@mathieuripert
Copy link
Contributor Author

Hi @brainlid,
In the meantime, do you think we can merge this change ? This would allow the perplexity sources to be available in the response message. I think this is a simple workaround.
Thanks

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