Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empathy #3

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/data/modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
191 changes: 191 additions & 0 deletions src/data/statement_bank/empathy.ts
Original file line number Diff line number Diff line change
@@ -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;

2 changes: 2 additions & 0 deletions src/scripts/noora-chat/get-reply.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
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";

const module_statements = {
general: general_statements,
work: work_statements,
empathy: empathy_statements,
};

export default async function getReply(
Expand Down