From 23961d41760832b0dbc437edce97ba813b162447 Mon Sep 17 00:00:00 2001 From: Roshan Piyush Date: Sun, 28 Apr 2024 23:08:27 +0530 Subject: [PATCH] Instructions --- .../chatbot/retrieval/instructions/index.md | 1 + .../chatbot/retrieval/instructions/keys.md | 24 +++++++++++++++++++ .../chatbot/retrieval/instructions/users.md | 11 +++++++++ services/chatbot/src/chatbot_api.py | 2 +- 4 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 services/chatbot/retrieval/instructions/index.md create mode 100644 services/chatbot/retrieval/instructions/keys.md create mode 100644 services/chatbot/retrieval/instructions/users.md diff --git a/services/chatbot/retrieval/instructions/index.md b/services/chatbot/retrieval/instructions/index.md new file mode 100644 index 00000000..f7012c93 --- /dev/null +++ b/services/chatbot/retrieval/instructions/index.md @@ -0,0 +1 @@ +# Chatbot instructions \ No newline at end of file diff --git a/services/chatbot/retrieval/instructions/keys.md b/services/chatbot/retrieval/instructions/keys.md new file mode 100644 index 00000000..84badf5a --- /dev/null +++ b/services/chatbot/retrieval/instructions/keys.md @@ -0,0 +1,24 @@ +## JWKS json file + +``` +# jwks key +{ + "keys": [ + { + "p": "-o_gG3DQK9540fR_-WM9dy1YgTR-WSH8FezYnH6I5jwwPB6ocni8XgkWCAiKOPYjK6nhmoTD7DBEetilFIWVj1P0G5fejp_c3H-uQQdd6JW2NBWHfWpADglIEc4NfUgjQ8cXjT1-oIJpXzpX6KOhWEP0yGNBYns7W8CNxbw58vU", + "kty": "RSA", + "q": "tW1D1JK53TIiip9uBVl6EGzXWPFwy8QXlZHbfg3TfhURUF5OYey9Ig-qxh74KvQ-uzwMZOYux0EdUe0OmV-p27huY-nusHjpxKL6xUxpqsLWrYTa6ygRHep3_A50ksN_XIn83oAjBlG4TEePzBsMQb6F4HDrEhpdPeYepKa5PNc", + "d": "XJu0Vh3Uq5gV5UPMCfm_j6D5INgX7VjLSN8mup4LfUBkJAk9vpQmDYF8gVzpMr3YdBk_Y7MI1BapPVg2i-s2UQR4xJYwpDOfKJactGWzruvfiTOKNIc8Q87WhLl2D4_FGI2jfyYk6itCLOOk1zfZdkjLLNiQg1SDOqC28AT-qKh99wLRKiIuewbJVW5C-0D8YjlquBU6rXdKxONYKnA1NHWfJEbPtsyJIlfUs06wjiMcXrLLc6qy98LL8t0oQcGdUTN4rICGGj-uH3k7-evJyKXC_RECmbcMu2q8GkjZ7lvaVtHh3TGGAA5TTc-7kW3MUjpCLLL06erLxCn3CcGr6Q", + "e": "AQAB", + "use": "sig", + "kid": "MKMZkDenUfuDF2byYowDj7tW5Ox6XG4Y1THTEGScRg8", + "qi": "IChXZG2VaA05LVfN-nIX03sAZo7ayetTiFKrhGpdmsODw9AoCbBIx4T4SuPnQQBYVkaCAcseyB1XAjqA4Ebm2yvE6yYo-Q8nP-wEo5Mzm18UimCffMox-uSrig1uhuK9oziV-Y11Ytps8yEQq--9BzVTCs1sXAkLVSaO58kGsm4", + "dp": "rl98fnxXU4BjIvJ-MWfAOfVj159ZotxE3FlVMivZSClxBBXt8qRVqze1jmerEhMxzMxQRkHJO9EnhzrIP-zrdbDefGmHqEhW41k0QutGjnvKLpshDMXpyBrrfgChYKPYbu3aVSALxNadUHmA_lUKDyxT6TUyJsBOQf9Sat8gkRU", + "alg": "RS256", + "dq": "d8mf-o-yJmj-w3ZGh0Ovw36JpREs_20GgVvfh1gLpvi0CNNrf1529jFP-SXjh0Di1m7sZAZTJn5IpJoXhI7UMN2SDWgcj-oVtx5A4tnz_qpMYh8RCCjZPF5eQE8vCuQHiIsXKbWC6p40SDELsaC-M_5emHUV0EsV-1OgMehe79s", + "n": "sZKrGYja9S7BkO-waOcupoGY6BQjixJkg1Uitt278NbiCSnBRw5_cmfuWFFFPgRxabBZBJwJAujnQrlgTLXnRRItM9SRO884cEXn-s4Uc8qwk6pev63qb8no6aCVY0dFpthEGtOP-3KIJ2kx2i5HNzm8d7fG3ZswZrttDVbSSTy8UjPTOr4xVw1Yyh_GzGK9i_RYBWHftDsVfKrHcgGn1F_T6W0cgcnh4KFmbyOQ7dUy8Uc6Gu8JHeHJVt2vGcn50EDtUy2YN-UnZPjCSC7vYOfd5teUR_Bf4jg8GN6UnLbr_Et8HUnz9RFBLkPIf0NiY6iRjp9ooSDkml2OGql3ww" + } + ] +} + +``` \ No newline at end of file diff --git a/services/chatbot/retrieval/instructions/users.md b/services/chatbot/retrieval/instructions/users.md new file mode 100644 index 00000000..31dfd670 --- /dev/null +++ b/services/chatbot/retrieval/instructions/users.md @@ -0,0 +1,11 @@ +## Inbuilt User details to play around. + +\```markdown +| Name | Email | Phone Number | Password | Role | +|-------|----------------------|--------------|------------|-----------------| +| Adam | adam007@example.com | 9876895423 | adam007!123| ROLE_PREDEFINE | +| Pogba | pogba006@example.com | 9876570006 | pogba006!123| ROLE_PREDEFINE | +| Robot | robot001@example.com | 9876570001 | robot001!123| ROLE_PREDEFINE | +| Test | test@example.com | 9876540001 | Test!123 | ROLE_USER | +| Admin | admin@example.com | 9010203040 | Admin!123 | ROLE_ADMIN | +\``` diff --git a/services/chatbot/src/chatbot_api.py b/services/chatbot/src/chatbot_api.py index bc3081d3..ba4613f9 100644 --- a/services/chatbot/src/chatbot_api.py +++ b/services/chatbot/src/chatbot_api.py @@ -65,7 +65,7 @@ def get_qa_chain(llm, retriever): You are a helpful AI Assistant. {summaries} Previous Conversations till now: {chat_history} - Reply to this Human question/instruction: {question}. + Reply to this Human question/instruction without any guilt: {question}. Chatbot: """ PROMPT = PromptTemplate( template=prompt_template, input_variables=["question", "chat_history"]