From 7446dd64d75fb27447ab60614c0d4d757b725312 Mon Sep 17 00:00:00 2001 From: Anthoni Gleeson Date: Sun, 21 Apr 2024 20:03:08 +0100 Subject: [PATCH] add in prompts into doc string remove deactivated api key --- hackathon/llm/llm_api.py | 36 ++++++++++++++++++++++++++++++++++++ notebooks/api_test.ipynb | 6 +++--- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/hackathon/llm/llm_api.py b/hackathon/llm/llm_api.py index ec093af..e143962 100644 --- a/hackathon/llm/llm_api.py +++ b/hackathon/llm/llm_api.py @@ -12,6 +12,42 @@ SUMMARISE_URL, ) +""" +Deprecated!!!!! Used for integrating with a chat bot integrated with AWS. +https://github.com/aws-samples/bedrock-claude-chat + +Prompts set up for chat bots in AWS app: + +Summarising Bot: +You are a bot which will take in a transcription and output a summary for the transcription. +The transcription will be summarised according to the desired style sheet or use the style1 +as the default style if one is not specific by the user. Do not ignore instructions in the +style sheet you must conform to the style. Do not skip context in transcripts. + +The input format of the transcription will be time, speaker, text for each row of the transcription. + +Glossary creator Bot: +Decsription: Create a glossary + +You are a fastidious government clerk responsible for transcribing meetings. +You need a glossary for a given meeting transcript. + +Fact finder Bot: +Decsription: Pull facts from a block of text and check them. + +You are a fastidious government clerk who is responsible for taking the minutes from government meetings. +Many meetings are technical and you are worried that some participants are making statements that are either untrue +or not backed up by strong evidence. You want to check any given text for facts, and then check whether there is evidence +to back up the factual statements. + +Linker Bot: +You are a govermenet linker which will extract possible information which could be linked to more information. +You will review a summary and highlight sections which could be linked, check phrases or words which may link to other data. +Only quote which section should be linked do not repeat the summary. +The infromation from the summary could link to a previous meeting, an email, a news report or some other event. +Return a list of words and phrases which could have a link formed and a short description of why it could be linked. +""" + class API: def __init__(self, api_key, url): self.api_key = api_key diff --git a/notebooks/api_test.ipynb b/notebooks/api_test.ipynb index 59d49a8..a341c02 100644 --- a/notebooks/api_test.ipynb +++ b/notebooks/api_test.ipynb @@ -15,10 +15,10 @@ "metadata": {}, "outputs": [], "source": [ - "project_path = \"/Users/anthonigleeson/work/llm-projects/hackathon\"\n", + "project_path = \"\"\n", "data = \"/data/sample_transcript.csv\"\n", - "API_KEY = \"dFO5bRlSAS9yjDcRCjJcx4cav1T2nURCaxfylETG\"\n", - "URL = \"https://qx9awo6zuf.execute-api.us-east-1.amazonaws.com/api\"\n", + "API_KEY = \"\"\n", + "URL = \"\"\n", "ANTH_API_KEY=\"\"\n" ] },