Skip to content

Commit c87110a

Browse files
committed
Enable WebClient#assistant_threads_setSuggestedPrompts to skip title param
1 parent 1e9deef commit c87110a

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

slack_sdk/web/async_client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2053,7 +2053,9 @@ async def assistant_threads_setSuggestedPrompts(
20532053
"""Revokes a token.
20542054
https://api.slack.com/methods/assistant.threads.setSuggestedPrompts
20552055
"""
2056-
kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "title": title, "prompts": prompts})
2056+
kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "prompts": prompts})
2057+
if title is not None:
2058+
kwargs.update({"title": title})
20572059
return await self.api_call("assistant.threads.setSuggestedPrompts", json=kwargs)
20582060

20592061
async def auth_revoke(

slack_sdk/web/client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2044,7 +2044,9 @@ def assistant_threads_setSuggestedPrompts(
20442044
"""Revokes a token.
20452045
https://api.slack.com/methods/assistant.threads.setSuggestedPrompts
20462046
"""
2047-
kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "title": title, "prompts": prompts})
2047+
kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "prompts": prompts})
2048+
if title is not None:
2049+
kwargs.update({"title": title})
20482050
return self.api_call("assistant.threads.setSuggestedPrompts", json=kwargs)
20492051

20502052
def auth_revoke(

slack_sdk/web/legacy_client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2055,7 +2055,9 @@ def assistant_threads_setSuggestedPrompts(
20552055
"""Revokes a token.
20562056
https://api.slack.com/methods/assistant.threads.setSuggestedPrompts
20572057
"""
2058-
kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "title": title, "prompts": prompts})
2058+
kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "prompts": prompts})
2059+
if title is not None:
2060+
kwargs.update({"title": title})
20592061
return self.api_call("assistant.threads.setSuggestedPrompts", json=kwargs)
20602062

20612063
def auth_revoke(

0 commit comments

Comments
 (0)