From c87110abcbc41011bd4a95a5dcef9609d7fa1945 Mon Sep 17 00:00:00 2001 From: Kazuhiro Sera <seratch@gmail.com> Date: Thu, 19 Sep 2024 18:05:37 +0900 Subject: [PATCH] Enable WebClient#assistant_threads_setSuggestedPrompts to skip title param --- slack_sdk/web/async_client.py | 4 +++- slack_sdk/web/client.py | 4 +++- slack_sdk/web/legacy_client.py | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/slack_sdk/web/async_client.py b/slack_sdk/web/async_client.py index b33c68c3..7793e5ac 100644 --- a/slack_sdk/web/async_client.py +++ b/slack_sdk/web/async_client.py @@ -2053,7 +2053,9 @@ async def assistant_threads_setSuggestedPrompts( """Revokes a token. https://api.slack.com/methods/assistant.threads.setSuggestedPrompts """ - kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "title": title, "prompts": prompts}) + kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "prompts": prompts}) + if title is not None: + kwargs.update({"title": title}) return await self.api_call("assistant.threads.setSuggestedPrompts", json=kwargs) async def auth_revoke( diff --git a/slack_sdk/web/client.py b/slack_sdk/web/client.py index e42efef7..99b84d3c 100644 --- a/slack_sdk/web/client.py +++ b/slack_sdk/web/client.py @@ -2044,7 +2044,9 @@ def assistant_threads_setSuggestedPrompts( """Revokes a token. https://api.slack.com/methods/assistant.threads.setSuggestedPrompts """ - kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "title": title, "prompts": prompts}) + kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "prompts": prompts}) + if title is not None: + kwargs.update({"title": title}) return self.api_call("assistant.threads.setSuggestedPrompts", json=kwargs) def auth_revoke( diff --git a/slack_sdk/web/legacy_client.py b/slack_sdk/web/legacy_client.py index d93c3924..a30f4553 100644 --- a/slack_sdk/web/legacy_client.py +++ b/slack_sdk/web/legacy_client.py @@ -2055,7 +2055,9 @@ def assistant_threads_setSuggestedPrompts( """Revokes a token. https://api.slack.com/methods/assistant.threads.setSuggestedPrompts """ - kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "title": title, "prompts": prompts}) + kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "prompts": prompts}) + if title is not None: + kwargs.update({"title": title}) return self.api_call("assistant.threads.setSuggestedPrompts", json=kwargs) def auth_revoke(