Skip to content

Commit 55d7a7d

Browse files
authored
Merge pull request #872 from jaceksan/ai
PoC expose AI use cases
2 parents 2cad3a6 + 0ab5699 commit 55d7a7d

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

gooddata-sdk/gooddata_sdk/compute/service.py

+12-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import logging
55

66
from gooddata_api_client.model.chat_history_request import ChatHistoryRequest
7+
from gooddata_api_client.model.chat_history_result import ChatHistoryResult
78
from gooddata_api_client.model.chat_request import ChatRequest
89
from gooddata_api_client.model.chat_result import ChatResult
910

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

86-
def ai_chat_history(self, workspace_id: str, chat_history_interaction_id: int = 0) -> ChatResult:
87+
def ai_chat_history(self, workspace_id: str, chat_history_interaction_id: int = 0) -> ChatHistoryResult:
8788
"""
8889
Get chat history with AI in GoodData workspace.
8990
@@ -96,3 +97,13 @@ def ai_chat_history(self, workspace_id: str, chat_history_interaction_id: int =
9697
chat_history_request = ChatHistoryRequest(chat_history_interaction_id=chat_history_interaction_id)
9798
response = self._actions_api.ai_chat_history(workspace_id, chat_history_request, _check_return_type=False)
9899
return response
100+
101+
def ai_chat_history_reset(self, workspace_id: str) -> None:
102+
"""
103+
Reset chat history with AI in GoodData workspace.
104+
105+
Args:
106+
workspace_id: workspace identifier
107+
"""
108+
chat_history_request = ChatHistoryRequest(reset=True)
109+
self._actions_api.ai_chat_history(workspace_id, chat_history_request, _check_return_type=False)

0 commit comments

Comments
 (0)