Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion gooddata-sdk/gooddata_sdk/compute/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import logging

from gooddata_api_client.model.chat_history_request import ChatHistoryRequest
from gooddata_api_client.model.chat_history_result import ChatHistoryResult
from gooddata_api_client.model.chat_request import ChatRequest
from gooddata_api_client.model.chat_result import ChatResult

Expand Down Expand Up @@ -83,7 +84,7 @@ def ai_chat(self, workspace_id: str, question: str) -> ChatResult:
response = self._actions_api.ai_chat(workspace_id, chat_request, _check_return_type=False)
return response

def ai_chat_history(self, workspace_id: str, chat_history_interaction_id: int = 0) -> ChatResult:
def ai_chat_history(self, workspace_id: str, chat_history_interaction_id: int = 0) -> ChatHistoryResult:
"""
Get chat history with AI in GoodData workspace.

Expand All @@ -96,3 +97,13 @@ def ai_chat_history(self, workspace_id: str, chat_history_interaction_id: int =
chat_history_request = ChatHistoryRequest(chat_history_interaction_id=chat_history_interaction_id)
response = self._actions_api.ai_chat_history(workspace_id, chat_history_request, _check_return_type=False)
return response

def ai_chat_history_reset(self, workspace_id: str) -> None:
"""
Reset chat history with AI in GoodData workspace.

Args:
workspace_id: workspace identifier
"""
chat_history_request = ChatHistoryRequest(reset=True)
self._actions_api.ai_chat_history(workspace_id, chat_history_request, _check_return_type=False)
Loading