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

increase max_token as doc suggested.

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -12,7 +12,7 @@ print("key", openai.api_key)
12
  start_sequence = "\ChatGPT:"
13
  restart_sequence = "\nMe: "
14
 
15
- prompt = "The following is a conversation with an AI assistant. The assistant is helpful, creative, clever, and very friendly.\n\nHuman: Hello, who are you?\nAI: I am an AI created by OpenAI. How can I help you today?\nHuman: "
16
 
17
  def openai_create(prompt):
18
 
@@ -20,13 +20,12 @@ def openai_create(prompt):
20
  model="text-davinci-003",
21
  prompt=prompt,
22
  temperature=0.9,
23
- max_tokens=150,
24
  top_p=1,
25
  frequency_penalty=0,
26
  presence_penalty=0.6,
27
  stop=[" Me:", " ChatGPT:"]
28
  )
29
-
30
  return response.choices[0].text
31
 
32
 
 
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
 
 
20
  model="text-davinci-003",
21
  prompt=prompt,
22
  temperature=0.9,
23
+ max_tokens=500,
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
 
31