Skip to content

Commit 3b84eee

Browse files
authored
Merge pull request #1046 from Mara3l/master
feat(ai): Update AI compute docstring.
2 parents 54bb876 + b51f551 commit 3b84eee

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

gooddata-sdk/gooddata_sdk/compute/service.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ def retrieve_result_cache_metadata(self, workspace_id: str, result_id: str) -> R
6161
Gets execution result's metadata from GoodData.CN workspace for given execution result ID.
6262
6363
Args:
64-
workspace_id: workspace identifier
65-
result_id: execution result ID
64+
workspace_id (str): workspace identifier
65+
result_id (str): execution result ID
6666
Returns:
6767
ResultCacheMetadata: execution result's metadata
6868
"""
@@ -88,8 +88,8 @@ def ai_chat(self, workspace_id: str, question: str) -> ChatResult:
8888
Chat with AI in GoodData workspace.
8989
9090
Args:
91-
workspace_id: workspace identifier
92-
question: question to ask AI
91+
workspace_id (str): workspace identifier
92+
question (str): question for the AI
9393
Returns:
9494
ChatResult: Chat response
9595
"""
@@ -113,8 +113,8 @@ def ai_chat_stream(self, workspace_id: str, question: str) -> Iterator[Any]:
113113
Chat Stream with AI in GoodData workspace.
114114
115115
Args:
116-
workspace_id: workspace identifier
117-
question: question to ask AI
116+
workspace_id (str): workspace identifier
117+
question (str): question for the AI
118118
Returns:
119119
Iterator[Any]: Yields parsed JSON objects from each SSE event's data field
120120
"""
@@ -143,9 +143,9 @@ def get_ai_chat_history(
143143
Get chat history with AI in GoodData workspace.
144144
145145
Args:
146-
workspace_id: workspace identifier
147-
chat_history_interaction_id: collect history starting from this interaction id. If None, complete chat history is returned.
148-
thread_id_suffix: suffix to identify a specific chat thread. If provided, chat_history_interaction_id is ignored.
146+
workspace_id (str): workspace identifier
147+
chat_history_interaction_id (str): collect history starting from this interaction id. If None, complete chat history is returned. Defaults to "".
148+
thread_id_suffix (str): suffix to identify a specific chat thread. If provided, chat_history_interaction_id is ignored. Defaults to "".
149149
Returns:
150150
ChatHistoryResult: Chat history response containing interactions and other metadata
151151
"""
@@ -160,7 +160,7 @@ def reset_ai_chat_history(self, workspace_id: str) -> None:
160160
Reset chat history with AI in GoodData workspace.
161161
162162
Args:
163-
workspace_id: workspace identifier
163+
workspace_id (str): workspace identifier
164164
"""
165165
chat_history_request = ChatHistoryRequest(reset=True)
166166
self._actions_api.ai_chat_history(workspace_id, chat_history_request, _check_return_type=False)
@@ -176,10 +176,10 @@ def set_ai_chat_history_feedback(
176176
Provide feedback for a specific chat history interaction.
177177
178178
Args:
179-
workspace_id: workspace identifier
180-
user_feedback: feedback to provide ("POSITIVE", "NEGATIVE" or "NONE")
181-
chat_history_interaction_id: interaction id to provide feedback for
182-
thread_id_suffix: suffix to identify a specific chat thread
179+
workspace_id (str): workspace identifier
180+
user_feedback (str): feedback to provide ("POSITIVE", "NEGATIVE" or "NONE").
181+
chat_history_interaction_id (str): interaction id to provide feedback for.
182+
thread_id_suffix (str): suffix to identify a specific chat thread. Defaults to "".
183183
"""
184184
chat_history_request = ChatHistoryRequest(
185185
user_feedback=user_feedback,
@@ -203,14 +203,14 @@ def search_ai(
203203
Search for metadata objects using similarity search.
204204
205205
Args:
206-
workspace_id: workspace identifier
207-
question: keyword/sentence input for search
208-
deep_search: turn on deep search - if true, content of complex objects will be searched as well
209-
limit: maximum number of results to return
210-
object_types: list of object types to search for. Enum items: "attribute", "metric", "fact",
211-
"label", "date", "dataset", "visualization" and "dashboard"
212-
relevant_score_threshold: minimum relevance score threshold for results
213-
title_to_descriptor_ratio: ratio of title score to descriptor score
206+
workspace_id (str): workspace identifier
207+
question (str): keyword/sentence input for search
208+
deep_search (bool): turn on deep search - if true, content of complex objects will be searched as well
209+
limit (Optional[int]): maximum number of results to return. Defaults to None.
210+
object_types (Optional[list[str]]): list of object types to search for. Enum items: "attribute", "metric", "fact",
211+
"label", "date", "dataset", "visualization" and "dashboard". Defaults to None.
212+
relevant_score_threshold (Optional[float]): minimum relevance score threshold for results. Defaults to None.
213+
title_to_descriptor_ratio (Optional[float]): ratio of title score to descriptor score. Defaults to None.
214214
215215
Returns:
216216
SearchResult: Search results
@@ -263,8 +263,8 @@ def sync_metadata(self, workspace_id: str, async_req: bool = False) -> None:
263263
metadata synchronization becomes automatic.
264264
265265
Args:
266-
workspace_id: Workspace identifier
267-
async_req: If True, execute request asynchronously. Default is False.
266+
workspace_id (str): Workspace identifier
267+
async_req (bool): If True, execute request asynchronously. Defaults to False.
268268
269269
Returns:
270270
None

0 commit comments

Comments
 (0)