diff --git a/slack_sdk/web/async_client.py b/slack_sdk/web/async_client.py index 79293d8b9..0458b14c4 100644 --- a/slack_sdk/web/async_client.py +++ b/slack_sdk/web/async_client.py @@ -2131,7 +2131,7 @@ async def assistant_threads_setSuggestedPrompts( self, *, channel_id: str, - thread_ts: str, + thread_ts: Optional[str] = None, title: Optional[str] = None, prompts: List[Dict[str, str]], **kwargs, @@ -2139,7 +2139,9 @@ async def assistant_threads_setSuggestedPrompts( """Set suggested prompts for the given assistant thread. https://docs.slack.dev/reference/methods/assistant.threads.setSuggestedPrompts """ - kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "prompts": prompts}) + kwargs.update({"channel_id": channel_id, "prompts": prompts}) + if thread_ts is not None: + kwargs.update({"thread_ts": thread_ts}) if title is not None: kwargs.update({"title": title}) return await self.api_call("assistant.threads.setSuggestedPrompts", json=kwargs) diff --git a/slack_sdk/web/client.py b/slack_sdk/web/client.py index 4c597c2df..967713b4e 100644 --- a/slack_sdk/web/client.py +++ b/slack_sdk/web/client.py @@ -2121,7 +2121,7 @@ def assistant_threads_setSuggestedPrompts( self, *, channel_id: str, - thread_ts: str, + thread_ts: Optional[str] = None, title: Optional[str] = None, prompts: List[Dict[str, str]], **kwargs, @@ -2129,7 +2129,9 @@ def assistant_threads_setSuggestedPrompts( """Set suggested prompts for the given assistant thread. https://docs.slack.dev/reference/methods/assistant.threads.setSuggestedPrompts """ - kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "prompts": prompts}) + kwargs.update({"channel_id": channel_id, "prompts": prompts}) + if thread_ts is not None: + kwargs.update({"thread_ts": thread_ts}) if title is not None: kwargs.update({"title": title}) return self.api_call("assistant.threads.setSuggestedPrompts", json=kwargs) diff --git a/slack_sdk/web/legacy_client.py b/slack_sdk/web/legacy_client.py index afc4e4f64..ccbd09666 100644 --- a/slack_sdk/web/legacy_client.py +++ b/slack_sdk/web/legacy_client.py @@ -2132,7 +2132,7 @@ def assistant_threads_setSuggestedPrompts( self, *, channel_id: str, - thread_ts: str, + thread_ts: Optional[str] = None, title: Optional[str] = None, prompts: List[Dict[str, str]], **kwargs, @@ -2140,7 +2140,9 @@ def assistant_threads_setSuggestedPrompts( """Set suggested prompts for the given assistant thread. https://docs.slack.dev/reference/methods/assistant.threads.setSuggestedPrompts """ - kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "prompts": prompts}) + kwargs.update({"channel_id": channel_id, "prompts": prompts}) + if thread_ts is not None: + kwargs.update({"thread_ts": thread_ts}) if title is not None: kwargs.update({"title": title}) return self.api_call("assistant.threads.setSuggestedPrompts", json=kwargs)