Skip to content

Commit

Permalink
Merge pull request #873 from gooddata/snapshot-master-55d7a7d1-to-rel…
Browse files Browse the repository at this point in the history
…/dev

[bot] Merge master/55d7a7d1 into rel/dev
  • Loading branch information
yenkins-admin authored Nov 7, 2024
2 parents 5183042 + 55d7a7d commit 309dfb0
Showing 1 changed file with 12 additions and 1 deletion.
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)

0 comments on commit 309dfb0

Please sign in to comment.