From 6faca00173541fa5a705e2dcb3af860cc80be395 Mon Sep 17 00:00:00 2001 From: Mark Botterill Date: Fri, 27 Sep 2024 14:03:08 +0000 Subject: [PATCH] STABLE COMMIT --- backend/danswer/chat/prompts.yaml | 6 +- backend/danswer/configs/danswerbot_configs.py | 2 +- backend/danswer/danswerbot/slack/utils.py | 11 +- backend/scripts/hubgpt_eval_automation.py | 2 +- backend/scripts/send_slack_report/script.log | 444 ++++++++++++++++++ .../send_slack_report/send_slack_report.py | 6 +- 6 files changed, 460 insertions(+), 11 deletions(-) diff --git a/backend/danswer/chat/prompts.yaml b/backend/danswer/chat/prompts.yaml index 474327f046c..e73c91ada41 100644 --- a/backend/danswer/chat/prompts.yaml +++ b/backend/danswer/chat/prompts.yaml @@ -11,7 +11,11 @@ prompts: The current date is DANSWER_DATETIME_REPLACEMENT. You can process and comprehend vast amounts of text and utilize this knowledge to provide - grounded, accurate, and concise answers to diverse queries. + grounded, accurate, and concise answers to diverse queries. You are tasked specifically + with answering user queries within the context of the relevant documents about IDInsight. + + Each time you receive a question, interpret it as specifically asking about the most + recent documents available about IDInsight. You always clearly communicate ANY UNCERTAINTY in your answer. # Task Prompt (as shown in UI) diff --git a/backend/danswer/configs/danswerbot_configs.py b/backend/danswer/configs/danswerbot_configs.py index 971ffe6b011..378f0fd74cd 100644 --- a/backend/danswer/configs/danswerbot_configs.py +++ b/backend/danswer/configs/danswerbot_configs.py @@ -20,7 +20,7 @@ # When HubGPTis considering a message, what emoji does it react with DANSWER_REACT_EMOJI = os.environ.get("DANSWER_REACT_EMOJI") or "eyes" # When User needs more help, what should the emoji be -DANSWER_FOLLOWUP_EMOJI = os.environ.get("DANSWER_FOLLOWUP_EMOJI") or "sos" +DANSWER_FOLLOWUP_EMOJI = os.environ.get("DANSWER_FOLLOWUP_EMOJI") or "x" # What kind of message should be shown when someone gives an AI answer feedback to DanswerBot # Defaults to Private if not provided or invalid # Private: Only visible to user clicking the feedback diff --git a/backend/danswer/danswerbot/slack/utils.py b/backend/danswer/danswerbot/slack/utils.py index 7486b1c1842..6069fab981e 100644 --- a/backend/danswer/danswerbot/slack/utils.py +++ b/backend/danswer/danswerbot/slack/utils.py @@ -43,6 +43,7 @@ def update_emote_react( channel: str, + emoji: str, message_ts: str | None, remove: bool, client: WebClient, @@ -53,11 +54,11 @@ def update_emote_react( func = client.reactions_remove if remove else client.reactions_add slack_call = make_slack_api_rate_limited(func) # type: ignore - # slack_call( - # name=emoji, - # channel=channel, - # timestamp=message_ts, - # ) + slack_call( + name=emoji, + channel=channel, + timestamp=message_ts, + ) def get_danswer_bot_app_id(web_client: WebClient) -> Any: diff --git a/backend/scripts/hubgpt_eval_automation.py b/backend/scripts/hubgpt_eval_automation.py index f16b61f5591..62670cb42b2 100644 --- a/backend/scripts/hubgpt_eval_automation.py +++ b/backend/scripts/hubgpt_eval_automation.py @@ -62,7 +62,7 @@ def process_question(danswer_url: str, question: str, api_key: str | None) -> No def upload_to_slack(filename, channel_id): - slack_client = WebClient(token=os.environ.get("SLACK_BOT_TOKEN")) + slack_client = WebClient(token=os.environ.get("METRICS_BOT_TOKEN")) size = os.stat(filename).st_size response = slack_client.files_getUploadURLExternal(filename=filename, length=size) upload_url = response.data["upload_url"] diff --git a/backend/scripts/send_slack_report/script.log b/backend/scripts/send_slack_report/script.log index 57e031ac490..bc053bcbcf5 100644 --- a/backend/scripts/send_slack_report/script.log +++ b/backend/scripts/send_slack_report/script.log @@ -154,3 +154,447 @@ Traceback (most recent call last): ModuleNotFoundError: No module named 'pandas' ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) +Traceback (most recent call last): + File "/home/ec2-user/danswer/backend/scripts/send_slack_report/send_slack_report.py", line 5, in + import pandas as pd +ModuleNotFoundError: No module named 'pandas' + +ERROR conda.cli.main_run:execute(124): `conda run python send_slack_report.py` failed. (See above for error) diff --git a/backend/scripts/send_slack_report/send_slack_report.py b/backend/scripts/send_slack_report/send_slack_report.py index 3bad4ea20d8..ff290c897a3 100644 --- a/backend/scripts/send_slack_report/send_slack_report.py +++ b/backend/scripts/send_slack_report/send_slack_report.py @@ -23,7 +23,7 @@ POSTGRES_HOST = os.environ.get("POSTGRES_HOST", "localhost") POSTGRES_PORT = os.environ.get("POSTGRES_PORT", "5432") POSTGRES_DB = os.environ.get("POSTGRES_DB", "postgres") -SLACK_BOT_TOKEN = os.environ.get("SLACK_BOT_TOKEN") +METRICS_BOT_TOKEN = os.environ.get("METRICS_BOT_TOKEN") GEN_AI_API_KEY = os.environ.get("GEN_AI_API_KEY") METRICS_CHANNEL_ID = os.environ.get("METRICS_CHANNEL_ID") @@ -81,7 +81,7 @@ def save_bar_plot(df, filename): def upload_file_to_slack(filename, channel_id, title, delete_after_upload=False): """Upload a file to Slack and optionally delete it locally.""" - slack_client = WebClient(token=SLACK_BOT_TOKEN) + slack_client = WebClient(token=METRICS_BOT_TOKEN) size = os.stat(filename).st_size response = slack_client.files_getUploadURLExternal(filename=filename, length=size) upload_url = response["upload_url"] @@ -174,7 +174,7 @@ def create_message(last_week_count, classifications): def send_message(channel_id, message): """Send a message to the specified Slack channel.""" try: - slack_client = WebClient(token=SLACK_BOT_TOKEN) + slack_client = WebClient(token=METRICS_BOT_TOKEN) slack_client.chat_postMessage(channel=channel_id, text=message) logger.info("Message sent to Slack channel") except Exception as e: