maodd commited on
Commit
e720c78
1 Parent(s): 6610dd1

revise start sequence format.

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -7,12 +7,12 @@ openai.api_key = os.getenv("OPENAI_API_KEY")
7
 
8
  #if you have OpenAI API key as a string, enable the below
9
  # openai.api_key = ""
10
- print("key", openai.api_key)
11
 
12
- start_sequence = "\ChatGPT:"
13
  restart_sequence = "\nMe: "
14
 
15
- prompt = "Start by typing example content. Then use `Me:` or `ChatGPT:` with some clue to train model...\n\nMe: Hello, who are you?\nChatGPT: I am an AI created by OpenAI. How can I help you today?\nMe: "
16
 
17
  def openai_create(prompt):
18
 
@@ -24,7 +24,7 @@ def openai_create(prompt):
24
  top_p=1,
25
  frequency_penalty=0,
26
  presence_penalty=0.6,
27
- stop=[" Me:", " ChatGPT:"]
28
  )
29
  return response.choices[0].text
30
 
 
7
 
8
  #if you have OpenAI API key as a string, enable the below
9
  # openai.api_key = ""
10
+ # print("key", openai.api_key)
11
 
12
+ start_sequence = "\nAI:"
13
  restart_sequence = "\nMe: "
14
 
15
+ prompt = "Start by typing example content. Then use `Me:` or `AI:` with some clue to train model...\n\nMe: Hello, who are you?\nAI: I am AI created by OpenAI. How can I help you today?\nMe: "
16
 
17
  def openai_create(prompt):
18
 
 
24
  top_p=1,
25
  frequency_penalty=0,
26
  presence_penalty=0.6,
27
+ stop=[" Me:", " AI:"]
28
  )
29
  return response.choices[0].text
30