Skip to content

Commit 4a3c0ed

Browse files
authored
feat(web-api): add loading_messages to assistant.threads.setStatus method (#1746)
1 parent f60e37c commit 4a3c0ed

File tree

3 files changed

+21
-12
lines changed

3 files changed

+21
-12
lines changed

slack_sdk/web/async_client.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2075,12 +2075,15 @@ async def assistant_threads_setStatus(
20752075
channel_id: str,
20762076
thread_ts: str,
20772077
status: str,
2078+
loading_messages: Optional[List[str]] = None,
20782079
**kwargs,
20792080
) -> AsyncSlackResponse:
2080-
"""Revokes a token.
2081+
"""Set the status for an AI assistant thread.
20812082
https://api.slack.com/methods/assistant.threads.setStatus
20822083
"""
2083-
kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "status": status})
2084+
kwargs.update(
2085+
{"channel_id": channel_id, "thread_ts": thread_ts, "status": status, "loading_messages": loading_messages}
2086+
)
20842087
return await self.api_call("assistant.threads.setStatus", params=kwargs)
20852088

20862089
async def assistant_threads_setTitle(
@@ -2091,7 +2094,7 @@ async def assistant_threads_setTitle(
20912094
title: str,
20922095
**kwargs,
20932096
) -> AsyncSlackResponse:
2094-
"""Revokes a token.
2097+
"""Set the title for the given assistant thread.
20952098
https://api.slack.com/methods/assistant.threads.setTitle
20962099
"""
20972100
kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "title": title})
@@ -2106,7 +2109,7 @@ async def assistant_threads_setSuggestedPrompts(
21062109
prompts: List[Dict[str, str]],
21072110
**kwargs,
21082111
) -> AsyncSlackResponse:
2109-
"""Revokes a token.
2112+
"""Set suggested prompts for the given assistant thread.
21102113
https://api.slack.com/methods/assistant.threads.setSuggestedPrompts
21112114
"""
21122115
kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "prompts": prompts})

slack_sdk/web/client.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2065,12 +2065,15 @@ def assistant_threads_setStatus(
20652065
channel_id: str,
20662066
thread_ts: str,
20672067
status: str,
2068+
loading_messages: Optional[List[str]] = None,
20682069
**kwargs,
20692070
) -> SlackResponse:
2070-
"""Revokes a token.
2071+
"""Set the status for an AI assistant thread.
20712072
https://api.slack.com/methods/assistant.threads.setStatus
20722073
"""
2073-
kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "status": status})
2074+
kwargs.update(
2075+
{"channel_id": channel_id, "thread_ts": thread_ts, "status": status, "loading_messages": loading_messages}
2076+
)
20742077
return self.api_call("assistant.threads.setStatus", params=kwargs)
20752078

20762079
def assistant_threads_setTitle(
@@ -2081,7 +2084,7 @@ def assistant_threads_setTitle(
20812084
title: str,
20822085
**kwargs,
20832086
) -> SlackResponse:
2084-
"""Revokes a token.
2087+
"""Set the title for the given assistant thread.
20852088
https://api.slack.com/methods/assistant.threads.setTitle
20862089
"""
20872090
kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "title": title})
@@ -2096,7 +2099,7 @@ def assistant_threads_setSuggestedPrompts(
20962099
prompts: List[Dict[str, str]],
20972100
**kwargs,
20982101
) -> SlackResponse:
2099-
"""Revokes a token.
2102+
"""Set suggested prompts for the given assistant thread.
21002103
https://api.slack.com/methods/assistant.threads.setSuggestedPrompts
21012104
"""
21022105
kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "prompts": prompts})

slack_sdk/web/legacy_client.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2077,12 +2077,15 @@ def assistant_threads_setStatus(
20772077
channel_id: str,
20782078
thread_ts: str,
20792079
status: str,
2080+
loading_messages: Optional[List[str]] = None,
20802081
**kwargs,
20812082
) -> Union[Future, SlackResponse]:
2082-
"""Revokes a token.
2083+
"""Set the status for an AI assistant thread.
20832084
https://api.slack.com/methods/assistant.threads.setStatus
20842085
"""
2085-
kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "status": status})
2086+
kwargs.update(
2087+
{"channel_id": channel_id, "thread_ts": thread_ts, "status": status, "loading_messages": loading_messages}
2088+
)
20862089
return self.api_call("assistant.threads.setStatus", params=kwargs)
20872090

20882091
def assistant_threads_setTitle(
@@ -2093,7 +2096,7 @@ def assistant_threads_setTitle(
20932096
title: str,
20942097
**kwargs,
20952098
) -> Union[Future, SlackResponse]:
2096-
"""Revokes a token.
2099+
"""Set the title for the given assistant thread.
20972100
https://api.slack.com/methods/assistant.threads.setTitle
20982101
"""
20992102
kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "title": title})
@@ -2108,7 +2111,7 @@ def assistant_threads_setSuggestedPrompts(
21082111
prompts: List[Dict[str, str]],
21092112
**kwargs,
21102113
) -> Union[Future, SlackResponse]:
2111-
"""Revokes a token.
2114+
"""Set suggested prompts for the given assistant thread.
21122115
https://api.slack.com/methods/assistant.threads.setSuggestedPrompts
21132116
"""
21142117
kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "prompts": prompts})

0 commit comments

Comments
 (0)