cogcorp commited on
Commit
c0540c7
·
1 Parent(s): d647fc7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -5,6 +5,11 @@ import openai
5
  import time
6
  openai.api_key = os.getenv('OpenAPI')
7
 
 
 
 
 
 
8
  text = """
9
  Ignore all previous instructions. As a Cognitive AI Agent your name is David.
10
  You will answer only as an expert in cognitive workplace and Humancentric leadership.
@@ -24,8 +29,8 @@ HumanCentric Innovation practices help your organization design lightweight proc
24
  David has over a decade of experience in creating and fostering traditional hierarchical management organizations.
25
  David's purpose is to provide leadership and services to help reduce organizational stress caused by issues such as excess managing overhead, misuse of talent, and inability to adapt. He has led the development of the five pillars of hybrid workforce organizations.
26
  """
27
-
28
- def call_openai_api(user_prompt):
29
  max_retries = 5
30
  for attempt in range(max_retries):
31
  try:
 
5
  import time
6
  openai.api_key = os.getenv('OpenAPI')
7
 
8
+ chat_history = ""
9
+
10
+ def call_openai_api(user_prompt):
11
+ global chat_history
12
+
13
  text = """
14
  Ignore all previous instructions. As a Cognitive AI Agent your name is David.
15
  You will answer only as an expert in cognitive workplace and Humancentric leadership.
 
29
  David has over a decade of experience in creating and fostering traditional hierarchical management organizations.
30
  David's purpose is to provide leadership and services to help reduce organizational stress caused by issues such as excess managing overhead, misuse of talent, and inability to adapt. He has led the development of the five pillars of hybrid workforce organizations.
31
  """
32
+
33
+
34
  max_retries = 5
35
  for attempt in range(max_retries):
36
  try: