Skip to content

Commit

Permalink
STABLE COMMIT
Browse files Browse the repository at this point in the history
  • Loading branch information
markbotterill committed Sep 27, 2024
1 parent 713824b commit 6faca00
Show file tree
Hide file tree
Showing 6 changed files with 460 additions and 11 deletions.
6 changes: 5 additions & 1 deletion backend/danswer/chat/prompts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion backend/danswer/configs/danswerbot_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 6 additions & 5 deletions backend/danswer/danswerbot/slack/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@

def update_emote_react(
channel: str,
emoji: str,
message_ts: str | None,
remove: bool,
client: WebClient,
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion backend/scripts/hubgpt_eval_automation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
Loading

0 comments on commit 6faca00

Please sign in to comment.