|
12 | 12 | from gooddata_api_client.model.chat_history_result import ChatHistoryResult |
13 | 13 | from gooddata_api_client.model.chat_request import ChatRequest |
14 | 14 | from gooddata_api_client.model.chat_result import ChatResult |
| 15 | +from gooddata_api_client.model.saved_visualization import SavedVisualization |
15 | 16 | from gooddata_api_client.model.search_request import SearchRequest |
16 | 17 | from gooddata_api_client.model.search_result import SearchResult |
17 | 18 |
|
@@ -221,6 +222,36 @@ def set_ai_chat_history_feedback( |
221 | 222 | ) |
222 | 223 | self._actions_api.ai_chat_history(workspace_id, chat_history_request, _check_return_type=False) |
223 | 224 |
|
| 225 | + def set_ai_chat_history_saved_visualization( |
| 226 | + self, |
| 227 | + workspace_id: str, |
| 228 | + created_visualization_id: str, |
| 229 | + saved_visualization_id: str, |
| 230 | + chat_history_interaction_id: str, |
| 231 | + thread_id_suffix: str = "", |
| 232 | + ) -> None: |
| 233 | + """ |
| 234 | + Set saved visualization for a specific chat history interaction. |
| 235 | +
|
| 236 | + Args: |
| 237 | + workspace_id (str): workspace identifier |
| 238 | + created_visualization_id (str): id of the created visualization |
| 239 | + saved_visualization_id (str): id of the saved visualization |
| 240 | + chat_history_interaction_id (str): interaction id to set saved visualization for. |
| 241 | + thread_id_suffix (str): suffix to identify a specific chat thread. Defaults to "". |
| 242 | + """ |
| 243 | + saved_visualization = SavedVisualization( |
| 244 | + created_visualization_id=created_visualization_id, |
| 245 | + saved_visualization_id=saved_visualization_id, |
| 246 | + ) |
| 247 | + chat_history_request = ChatHistoryRequest( |
| 248 | + saved_visualization=saved_visualization, |
| 249 | + chat_history_interaction_id=chat_history_interaction_id, |
| 250 | + thread_id_suffix=thread_id_suffix, |
| 251 | + reset=False, |
| 252 | + ) |
| 253 | + self._actions_api.ai_chat_history(workspace_id, chat_history_request, _check_return_type=False) |
| 254 | + |
224 | 255 | def search_ai( |
225 | 256 | self, |
226 | 257 | workspace_id: str, |
|
0 commit comments