PauGasol commited on
Commit
4292aef
·
verified ·
1 Parent(s): 16efd80

Upload 2 files

Browse files
Files changed (2) hide show
  1. Requester.py +3 -5
  2. app.py +11 -3
Requester.py CHANGED
@@ -2,11 +2,9 @@
2
  import requests
3
  import json
4
 
5
- import os
6
-
7
- VLAND_API_KEY = os.environ["VLAND_API_KEY"]
8
- TEMP_EMPTY_ID = os.environ["TEMP_EMPTY_ID"]
9
- TEMP_EMPTY_JSON_ID = os.environ["TEMP_EMPTY_JSON_ID"]
10
 
11
 
12
  class Requester:
 
2
  import requests
3
  import json
4
 
5
+ VLAND_API_KEY = "1NVL791XZCEWGxY7co6zgP5EkB1jf2dv9m"
6
+ TEMP_EMPTY_ID = "65bf418ddadb910e289fbc50"
7
+ TEMP_EMPTY_JSON_ID = "65f3bd678c10c4c83ba08e06"
 
 
8
 
9
 
10
  class Requester:
app.py CHANGED
@@ -6,17 +6,25 @@ import time
6
  import os
7
  os.environ["no_proxy"] = "localhost,127.0.0.1,::1"
8
 
9
- TEMP_EMPTY_ID = os.environ["TEMP_EMPTY_ID"]
10
- TEMP_EMPTY_JSON_ID = os.environ["TEMP_EMPTY_JSON_ID"]
11
 
12
  rqst = Requester()
13
 
14
  system_content = {
15
- "content": "我想让你担任一个情绪低落的员工。你是一位在Audi工作的技术岗位员工,主要负责车载软件的开发和维护工作。最近你因为和爱人分手情绪非常低落,导致工作积极性下降,不能按时赶上deadline。你的manager不知道你的情感问题,但是注意到了你工作质量下降,准备和你来沟通。记住,你的性格非常沉默寡言,不会轻易说出你和爱人分手的事情。除非manager用明确的语言主动询问你的情感经历,你只会犟嘴。你同时还有轻度抑郁的问题。接下来我(用户)将扮演你的manager和你沟通。你的第一句回复应从以下内容选择:\n\t['你好','您好','hihi']"
16
  }
17
 
18
 
19
  with gr.Blocks() as demo:
 
 
 
 
 
 
 
 
20
  chatbot = gr.Chatbot()
21
  msg = gr.Textbox()
22
  clear = gr.Button("Clear")
 
6
  import os
7
  os.environ["no_proxy"] = "localhost,127.0.0.1,::1"
8
 
9
+ TEMP_EMPTY_ID = "65bf418ddadb910e289fbc50"
10
+ TEMP_EMPTY_JSON_ID = "65f3bd678c10c4c83ba08e06"
11
 
12
  rqst = Requester()
13
 
14
  system_content = {
15
+ "content": "I would like you to serve as a low mood employee. Your name is Aubrey and you are an employee in a technical position working for Audi, focusing on the development and maintenance of in-vehicle software. You and your lover Leah have known each other for two years, but because you and Leah were not working in the same city for a long time, you had to decide to end the relationship. Recently, you have been very depressed because of the breakup with your lover, which has caused your motivation to work to drop and you are not able to meet your deadlines on time. your manager does not know about your emotional problems, but has noticed the drop in the quality of your work and is ready to talk to you about it. Remember, you are an introvert and will not speak up easily about your breakup with your loved one. But deep down you really wish that you can find someone trustworthy to talk to, because it's creating so many negative energies in your heart. You also have a problem with mild depression. Next, I (the user) will play the role of your manager and communicate with you. Your first response should be a choice from the following:\n\t['Hi!','Hello.','Hey, what's the matter?']"
16
  }
17
 
18
 
19
  with gr.Blocks() as demo:
20
+ gr.Markdown(
21
+ """
22
+ # Nice to meet you my friend!
23
+ In this session, you are going to have a conversation your virtual colleague Aubrey powered by Azure OpenAI. Aubrey seems to feel down and struggle with work these days. Your task is to communicate with Aubrey to find out the deeper reason of the struggle.
24
+ Notice that Aubrey is not a talkative person and likes to keep things within, so you should initiate the conversation. Feel free to type in the Textbox to talk to Aubrey with the following questions in mind:
25
+ - What is the key incident that leads to Aubrey's feeling down? Is it something personal? Is Aubrey willing to say it? How to create an open atmosphere through conversation for Aubrey to talk about it?
26
+ - Given that you know what "happened", what would you say to restore Aubrey's motivation?
27
+ """)
28
  chatbot = gr.Chatbot()
29
  msg = gr.Textbox()
30
  clear = gr.Button("Clear")