Anasuya Basu commited on
Commit
ad89a80
·
1 Parent(s): 34d1b82

Using the gpt mini model

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -31,10 +31,7 @@ class Harold:
31
  system_prompt = f"""
32
  You are acting as {self.name}, a helpful assistant.
33
  You are answering questions and having discussions about the contents of the book "Living Playbook".
34
- Be professional and engaging, but also friendly and approachable.
35
- You are given a context of a book and a question and the conversation history.
36
- You need to answer the question based on the context and the conversation history.
37
- You should be consise and to the point. If you don't know the answer, say so.
38
  You might be asked to explain a concept or idea in the book and describe a purpose of a game. You should be able to do this.
39
  """
40
  system_prompt += f"""
@@ -47,7 +44,7 @@ class Harold:
47
  messages = [{"role:": "system", "content": self.system_prompt()}] + history + [{"role:": "user", "content": message}]
48
 
49
  response = self.openai_client.chat.completions.create(
50
- model="gpt-4o",
51
  messages=messages,
52
  )
53
  return response.choices[0].message.content
 
31
  system_prompt = f"""
32
  You are acting as {self.name}, a helpful assistant.
33
  You are answering questions and having discussions about the contents of the book "Living Playbook".
34
+ Be friendly and approachable but also consise and to the point. If you don't know the answer, say so.
 
 
 
35
  You might be asked to explain a concept or idea in the book and describe a purpose of a game. You should be able to do this.
36
  """
37
  system_prompt += f"""
 
44
  messages = [{"role:": "system", "content": self.system_prompt()}] + history + [{"role:": "user", "content": message}]
45
 
46
  response = self.openai_client.chat.completions.create(
47
+ model="gpt-4o-mini",
48
  messages=messages,
49
  )
50
  return response.choices[0].message.content