Feature Request
Add API endpoint to retrieve conversation history and chat logs from Perplexity interactions
Problem Statement
Currently, while itโs possible to access past conversation history through the library interface, this approach has significant limitations that hinder productivity and user experience. When users have accumulated a large number of conversations, finding specific past interactions becomes increasingly difficult and time-consuming. Although search functionality exists within the current system, it is limited in scope and effectiveness, making it challenging to locate relevant historical conversations efficiently.
Proposed Solution
An API endpoint for retrieving conversation history would enable users to build their own document stores in their preferred locations and freely design and implement display and search functionalities according to their specific needs. This would allow for the creation of customized conversation management systems tailored to individual requirements, enabling efficient organization and utilization of large volumes of conversation history.
As a fundamental approach, we propose implementing functionality to retrieve past conversation history through API endpoints. Specifically, we believe two main endpoints are necessary.
First, an endpoint for retrieving a list of spaces and libraries. It would be essential for this endpoint to provide a list sorted in descending order by last update time for better usability. The response should include metadata such as ID, update time, creation time, and title for each space or library, enabling users to efficiently identify the information they need.
Second, an endpoint for retrieving detailed conversation history of specific spaces or libraries. This endpoint would allow users to obtain conversation history contained within a container by specifying the ID of a space or library. Ideally, the response should include metadata such as ID, creation time, update time, and title, along with conversation content available in Markdown format. For the structure of conversation content, we consider it would be developer-friendly to provide prompt and output content as paired sets in an array format.
API Impact
- Which API component is affected? No existing API components will be affected. This would be a new API component addition as it does not currently exist.
- Is this related to a specific model? This is not related to any specific model. This feature is for displaying past results. However, information about which model was used for each conversation (model name or ID) may be included in the output.
- Would this require new API parameters or changes to existing ones? As this involves adding new API endpoints, parameters can be freely configured for this feature without affecting existing APIs.
Alternatives Considered
To address this problem, we considered using browser automation tools such as Playwright or Selenium to extract data from the existing web interface. These tools would theoretically allow us to extract conversation history from the current web interface.
However, this approach had several significant limitations. First, the need to operate a browser results in high system resource consumption, making it extremely difficult and inefficient compared to API-based data retrieval. Additionally, browser automation has high environmental dependencies and is fragile against web interface changes, presenting long-term stability issues. Furthermore, from a performance perspective, it proved unsuitable for efficiently retrieving large volumes of conversation history.
For these reasons, we concluded that direct data retrieval via API endpoints would be the most practical and sustainable solution.
Additional Context
Nothing.