Skip to content

Commit

Permalink
Remove title param from set_suggested_prompts calls
Browse files Browse the repository at this point in the history
  • Loading branch information
seratch committed Sep 18, 2024
1 parent 368b1f0 commit a736a9a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions examples/assistants/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@
def start_thread(say: Say, set_suggested_prompts: SetSuggestedPrompts):
say(":wave: Hi, how can I help you today?")
set_suggested_prompts(
title="New chat",
prompts=[
"What does SLACK stand for?",
"When Slack was released?",
],
]
)


Expand Down
3 changes: 1 addition & 2 deletions examples/assistants/async_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@
async def start_thread(say: AsyncSay, set_suggested_prompts: AsyncSetSuggestedPrompts):
await say(":wave: Hi, how can I help you today?")
await set_suggested_prompts(
title="New chat",
prompts=[
"What does SLACK stand for?",
"When Slack was released?",
],
]
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __init__(
self.channel_id = channel_id
self.thread_ts = thread_ts

async def __call__(self, title: str, prompts: List[Union[str, Dict[str, str]]]) -> AsyncSlackResponse:
async def __call__(self, prompts: List[Union[str, Dict[str, str]]]) -> AsyncSlackResponse:
prompts_arg: List[Dict[str, str]] = []
for prompt in prompts:
if isinstance(prompt, str):
Expand All @@ -30,6 +30,5 @@ async def __call__(self, title: str, prompts: List[Union[str, Dict[str, str]]])
return await self.client.assistant_threads_setSuggestedPrompts(
channel_id=self.channel_id,
thread_ts=self.thread_ts,
title=title,
prompts=prompts_arg,
)
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __init__(
self.channel_id = channel_id
self.thread_ts = thread_ts

def __call__(self, title: str, prompts: List[Union[str, Dict[str, str]]]) -> SlackResponse:
def __call__(self, prompts: List[Union[str, Dict[str, str]]]) -> SlackResponse:
prompts_arg: List[Dict[str, str]] = []
for prompt in prompts:
if isinstance(prompt, str):
Expand All @@ -30,6 +30,5 @@ def __call__(self, title: str, prompts: List[Union[str, Dict[str, str]]]) -> Sla
return self.client.assistant_threads_setSuggestedPrompts(
channel_id=self.channel_id,
thread_ts=self.thread_ts,
title=title,
prompts=prompts_arg,
)

0 comments on commit a736a9a

Please sign in to comment.