eagle0504 commited on
Commit
97c3d64
1 Parent(s): 57158e3

Update utils/helper.py

Browse files
Files changed (1) hide show
  1. utils/helper.py +2 -4
utils/helper.py CHANGED
@@ -3,11 +3,9 @@ from openai import OpenAI
3
 
4
 
5
  class ChatBot:
6
- def __init__(self, protocol, conversation):
7
  self.client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])
8
- self.protocol = protocol
9
- self.conversation = conversation
10
- self.history = [{"role": "system", "content": self.protocol}] + self.conversation
11
 
12
  def generate_response(self, prompt: str) -> str:
13
  self.history.append({"role": "user", "content": prompt})
 
3
 
4
 
5
  class ChatBot:
6
+ def __init__(self):
7
  self.client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])
8
+ self.history = [{"role": "system", "content": "You are a helpful assistant."}]
 
 
9
 
10
  def generate_response(self, prompt: str) -> str:
11
  self.history.append({"role": "user", "content": prompt})