Skip to content

Commit

Permalink
minor change in post_response
Browse files Browse the repository at this point in the history
  • Loading branch information
NinaTea committed Aug 15, 2024
1 parent bc7e282 commit 864eba8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions geppetto/slack_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,8 @@ def post_response(self,
error_msg = "There was an error when posting the message."
thread_history["msgs"].append({"role": ASSISTANT, "content": error_msg})
self.thread_messages[thread_id] = thread_history
self.post_response(error_msg, channel_id,
thread_id, timestamp)

self.send_message(channel_id, thread_id, error_msg)

def handle_event(self, body):
"""
Receives an event from the slack channel and checks if the user that sent the message is allowed to interact with the Geppetto.
Expand Down Expand Up @@ -243,7 +242,6 @@ def list_llms(self, channel_id, thread_id):
response = self.send_message(channel_id,
thread_id,
formated_msg)

if response["ok"]:
timestamp = response["message"]["ts"]
self.app.client.chat_update(channel=channel_id,
Expand Down

0 comments on commit 864eba8

Please sign in to comment.