From a04ce308d582c38a0385ac680c65083a4603d7d4 Mon Sep 17 00:00:00 2001 From: Abhinav Garg Date: Wed, 2 Nov 2022 14:41:13 -0700 Subject: [PATCH 1/2] inital file for Empathy to be modified by Nathan Signed-off-by: Abhinav Garg --- src/data/statement_bank/empathy.ts | 191 +++++++++++++++++++++++++++++ 1 file changed, 191 insertions(+) create mode 100644 src/data/statement_bank/empathy.ts diff --git a/src/data/statement_bank/empathy.ts b/src/data/statement_bank/empathy.ts new file mode 100644 index 00000000..26e59d20 --- /dev/null +++ b/src/data/statement_bank/empathy.ts @@ -0,0 +1,191 @@ +const general_statements = { + positive: [ + [ + "general/positive", + "I love hiking.", + "Hiking is a great way to get some exercise.", + ], + [ + "general/positive", + "We went to the beach last weekend.", + "That sounds like a lot of fun. I'm glad you had a good time.", + ], + [ + "general/positive", + "I sold a bunch of stuff at my garage sale last weekend.", + "That's great! I'm so happy for you!", + ], + [ + "general/positive", + "It's beautiful weather today.", + "Yes, it's lovely weather. ", + ], + [ + "general/positive", + "I just started a workout routine.", + "Good for you! How is it going?", + ], + [ + "general/positive", + "It's really fun going to the dog park.", + "We should go together some time!", + ], + [ + "general/positive", + "My friend is helping me learn Spanish.", + "That's really cool! How are you finding it?", + ], + [ + "general/positive", + "I got a really cheap airplane ticket for my vacation.", + "That's great! I'm sure you'll have a wonderful time.", + ], + [ + "general/positive", + "The weather was great last weekend.", + "Yes, it was! What did you do last weekend?", + ], + [ + "general/positive", + "My daughter loves to take walks.", + "That's wonderful! It's great that she enjoys getting some exercise.", + ], + [ + "general/positive", + "I just joined a volunteer group.", + "Why did you join a volunteer group?", + ], + [ + "general/positive", + "I love working in my garden.", + "Gardening is a great hobby!", + ], + ], + neutral: [ + [ + "general/neutral", + "Tomorrow is supposed to be warm.", + "What's the temperature supposed to be?", + ], + [ + "general/neutral", + "I take a run every morning.", + "Good for you! Where do you run?", + ], + [ + "general/neutral", + "There are still a lot of businesses that mail paper catalogs.", + "Yes, there are. Many people enjoy receiving catalogs in the mail.", + ], + [ + "general/neutral", + "It's a good idea to study every night instead of waiting until the test.", + "I think that's a great idea!", + ], + [ + "general/neutral", + "We went to the beach over the weekend.", + "That sounds like a lot of fun! I'm glad you had a good time.", + ], + [ + "general/neutral", + "I usually go out on Friday nights, but this week I'm staying home.", + "That's sounds like a good plan.", + ], + [ + "general/neutral", + "I've been listening to books on tape.", + "What books have you been listening to?", + ], + [ + "general/neutral", + "There are some new shows on tv.", + "That's great! I'd love to watch some with you.", + ], + [ + "general/neutral", + "I talked with my professor about the class.", + "Good for you! I hope it went well.", + ], + [ + "general/neutral", + "I'm looking for a job.", + "What kind of job are you looking for?", + ], + [ + "general/neutral", + "I applied for a few jobs.", + "That's great, I hope you get one of them!", + ], + ], + negative: [ + [ + "general/negative", + "My brother and I got in an argument last night.", + "I'm sorry to hear that, what happened?", + ], + [ + "general/negative", + "I had an upset stomach last night.", + "I'm sorry to hear that. I hope you're feeling better now.", + ], + [ + "general/negative", + "I was so sick over the weekend.", + "That sounds terrible. I hope you're feeling better now.", + ], + [ + "general/negative", + "My boyfriend lost his job.", + "I'm sorry to hear that. I hope he's doing okay.", + ], + [ + "general/negative", + "My cat ate something and was so sick last night.", + "Oh no, what did your cat eat?", + ], + [ + "general/negative", + "I had to take my daughter to the emergency room last week.", + "I'm so sorry to hear that. Is she doing better?", + ], + [ + "general/negative", + "I had the flu that lasted a week.", + "I'm sorry to hear that, I hope you're feeling better now. ", + ], + [ + "general/negative", + "My aunt wants to visit but my house is too small.", + "That sounds really tough. I know how you feel.", + ], + [ + "general/negative", + "I couldn't figure out the new computer program.", + "What was the problem?", + ], + [ + "general/negative", + "My friend's mother died over the weekend.", + "I'm so sorry for her loss. If there's anything I can do to help, please let me know.", + ], + [ + "general/negative", + "My best friend just found out she has cancer.", + "I'm so sorry to hear that. How are you holding up?", + ], + [ + "general/negative", + "I have to move out of my apartment.", + "I hope everything works out for you. Let me know if I can help in any way.", + ], + [ + "general/negative", + "My landlord sold the house so I have to move out.", + "Why did he sell the house?", + ], + ], + }; + + export default general_statements; + \ No newline at end of file From 00569c1c487b67ebc0dc4e7ac3724f1d4edb0fdb Mon Sep 17 00:00:00 2001 From: Abhinav Garg Date: Wed, 2 Nov 2022 14:45:21 -0700 Subject: [PATCH 2/2] inital file for Empathy to be modified by Nathan Signed-off-by: Abhinav Garg --- src/data/modules.ts | 15 +++++++++++++++ src/scripts/noora-chat/get-reply.ts | 2 ++ 2 files changed, 17 insertions(+) diff --git a/src/data/modules.ts b/src/data/modules.ts index add535ea..efe2b109 100644 --- a/src/data/modules.ts +++ b/src/data/modules.ts @@ -35,6 +35,21 @@ const modules = { }, icon: BriefcaseIcon, }, + empathy: { + title: "empathy", + module: "empathy", + desc: "In this module, Noora is your co-worker and speaks on a variety of work-related topics such as promotions and job updates.", + selectedDesc: + "Noora is your co-worker and you will practice replying to statements you might hear in a workplace.", + example: { + statement: "I’m way too busy right now.", + reply: "I’m sorry. Can I help you with anything?", + sentiment: "Negative", + explanation: + "Your reply shows that you understand and want to help me.", + }, + icon: BriefcaseIcon, + }, }; export default modules; diff --git a/src/scripts/noora-chat/get-reply.ts b/src/scripts/noora-chat/get-reply.ts index 0ef64666..b2ac1fb6 100644 --- a/src/scripts/noora-chat/get-reply.ts +++ b/src/scripts/noora-chat/get-reply.ts @@ -1,5 +1,6 @@ import general_statements from "../../data/statement_bank/general"; import work_statements from "../../data/statement_bank/work"; +import empathy_statements from "../../data/statement_bank/empathy" import Completion from "../gpt-3/Completion"; import { v4 as uuidv4 } from "uuid"; import formPrompt from "../gpt-3/generate-evaluation-prompt"; @@ -7,6 +8,7 @@ import formPrompt from "../gpt-3/generate-evaluation-prompt"; const module_statements = { general: general_statements, work: work_statements, + empathy: empathy_statements, }; export default async function getReply(