From b51f551552b5cc0574d6c62f837488d540f4851d Mon Sep 17 00:00:00 2001 From: Mara3l Date: Tue, 27 May 2025 13:01:43 +0200 Subject: [PATCH] feat(ai): Update AI compute docstring. --- gooddata-sdk/gooddata_sdk/compute/service.py | 48 ++++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/gooddata-sdk/gooddata_sdk/compute/service.py b/gooddata-sdk/gooddata_sdk/compute/service.py index 854cb9605..16bd47e33 100644 --- a/gooddata-sdk/gooddata_sdk/compute/service.py +++ b/gooddata-sdk/gooddata_sdk/compute/service.py @@ -61,8 +61,8 @@ def retrieve_result_cache_metadata(self, workspace_id: str, result_id: str) -> R Gets execution result's metadata from GoodData.CN workspace for given execution result ID. Args: - workspace_id: workspace identifier - result_id: execution result ID + workspace_id (str): workspace identifier + result_id (str): execution result ID Returns: ResultCacheMetadata: execution result's metadata """ @@ -88,8 +88,8 @@ def ai_chat(self, workspace_id: str, question: str) -> ChatResult: Chat with AI in GoodData workspace. Args: - workspace_id: workspace identifier - question: question to ask AI + workspace_id (str): workspace identifier + question (str): question for the AI Returns: ChatResult: Chat response """ @@ -113,8 +113,8 @@ def ai_chat_stream(self, workspace_id: str, question: str) -> Iterator[Any]: Chat Stream with AI in GoodData workspace. Args: - workspace_id: workspace identifier - question: question to ask AI + workspace_id (str): workspace identifier + question (str): question for the AI Returns: Iterator[Any]: Yields parsed JSON objects from each SSE event's data field """ @@ -143,9 +143,9 @@ def get_ai_chat_history( Get chat history with AI in GoodData workspace. Args: - workspace_id: workspace identifier - chat_history_interaction_id: collect history starting from this interaction id. If None, complete chat history is returned. - thread_id_suffix: suffix to identify a specific chat thread. If provided, chat_history_interaction_id is ignored. + workspace_id (str): workspace identifier + chat_history_interaction_id (str): collect history starting from this interaction id. If None, complete chat history is returned. Defaults to "". + thread_id_suffix (str): suffix to identify a specific chat thread. If provided, chat_history_interaction_id is ignored. Defaults to "". Returns: ChatHistoryResult: Chat history response containing interactions and other metadata """ @@ -160,7 +160,7 @@ def reset_ai_chat_history(self, workspace_id: str) -> None: Reset chat history with AI in GoodData workspace. Args: - workspace_id: workspace identifier + workspace_id (str): workspace identifier """ chat_history_request = ChatHistoryRequest(reset=True) 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( Provide feedback for a specific chat history interaction. Args: - workspace_id: workspace identifier - user_feedback: feedback to provide ("POSITIVE", "NEGATIVE" or "NONE") - chat_history_interaction_id: interaction id to provide feedback for - thread_id_suffix: suffix to identify a specific chat thread + workspace_id (str): workspace identifier + user_feedback (str): feedback to provide ("POSITIVE", "NEGATIVE" or "NONE"). + chat_history_interaction_id (str): interaction id to provide feedback for. + thread_id_suffix (str): suffix to identify a specific chat thread. Defaults to "". """ chat_history_request = ChatHistoryRequest( user_feedback=user_feedback, @@ -203,14 +203,14 @@ def search_ai( Search for metadata objects using similarity search. Args: - workspace_id: workspace identifier - question: keyword/sentence input for search - deep_search: turn on deep search - if true, content of complex objects will be searched as well - limit: maximum number of results to return - object_types: list of object types to search for. Enum items: "attribute", "metric", "fact", - "label", "date", "dataset", "visualization" and "dashboard" - relevant_score_threshold: minimum relevance score threshold for results - title_to_descriptor_ratio: ratio of title score to descriptor score + workspace_id (str): workspace identifier + question (str): keyword/sentence input for search + deep_search (bool): turn on deep search - if true, content of complex objects will be searched as well + limit (Optional[int]): maximum number of results to return. Defaults to None. + object_types (Optional[list[str]]): list of object types to search for. Enum items: "attribute", "metric", "fact", + "label", "date", "dataset", "visualization" and "dashboard". Defaults to None. + relevant_score_threshold (Optional[float]): minimum relevance score threshold for results. Defaults to None. + title_to_descriptor_ratio (Optional[float]): ratio of title score to descriptor score. Defaults to None. Returns: SearchResult: Search results @@ -263,8 +263,8 @@ def sync_metadata(self, workspace_id: str, async_req: bool = False) -> None: metadata synchronization becomes automatic. Args: - workspace_id: Workspace identifier - async_req: If True, execute request asynchronously. Default is False. + workspace_id (str): Workspace identifier + async_req (bool): If True, execute request asynchronously. Defaults to False. Returns: None