Skip to content

Commit

Permalink
Enable WebClient#assistant_threads_setSuggestedPrompts to skip title …
Browse files Browse the repository at this point in the history
…param
  • Loading branch information
seratch committed Sep 19, 2024
1 parent 1e9deef commit c87110a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion slack_sdk/web/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 3 additions & 1 deletion slack_sdk/web/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 3 additions & 1 deletion slack_sdk/web/legacy_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit c87110a

Please sign in to comment.