History
The History module provides functions to access the history of generated queries, charts, and chat messages.
Common Classes
GeneratedHistoryEntryType
An enum representing the types of history entries:
QUERYCHARTCHAT
GeneratedHistoryEntryBase
A base class for history entries containing:
GeneratedHistoryEntryType historyType: The type of history entry.long timestamp: When the entry was created (in milliseconds).
GeneratedQueryHistoryEntry
Extends GeneratedHistoryEntryBase for query history entries containing:
GeneratedQuery query: Details of the generated query.QueryGenerationRequest request: Request used to generate the query.
GeneratedChartHistoryEntry
Extends GeneratedHistoryEntryBase for chart history entries containing:
ChartGenerationRequest request: Request used to generate the chart.ChartGenerationResponse response: Response of the chart generation.
GeneratedChatHistoryEntry
Extends GeneratedHistoryEntryBase for chat history entries containing:
ChatRequest request: Request used for chat generation.ChatResponse response: Response of the chat generation.
Get History
public GetGeneratedQueryRequest list(GetGeneratedQueryResponse params) throws IOException;
This function retrieves the history of generated queries, charts, and chat messages.
GetGeneratedQueryRequest
Parameters for the list method:
List<GeneratedHistoryEntryType> includedTypes: Types of history entries to include.Integer limit: Maximum number of entries to return (default:1000).Integer offset: Offset of the first entry to return (default:0).String timestampSortOrder: Sort order of entries based on timestamp ('asc'or'desc', default:'desc').
GetGeneratedQueryResponse
Response object containing:
List<GeneratedHistoryEntryBase> history: List of history entries.