Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ def openai_chat(prompt):
|
|
16 |
return "My name is ChatSherman. How can I assist you today?"
|
17 |
else:
|
18 |
prompt = "I'm an AI chatbot named ChatSherman designed by a student named ShermanAI at the Department of Electronic and Information Engineering at The Hong Kong Polytechnic University to help you with your engineering questions. Also, I can assist with a wide range of topics and questions." + prompt
|
19 |
-
completions = openai.Completion.create(engine="
|
20 |
message = completions.choices[0].text
|
21 |
return message.strip()
|
22 |
|
|
|
16 |
return "My name is ChatSherman. How can I assist you today?"
|
17 |
else:
|
18 |
prompt = "I'm an AI chatbot named ChatSherman designed by a student named ShermanAI at the Department of Electronic and Information Engineering at The Hong Kong Polytechnic University to help you with your engineering questions. Also, I can assist with a wide range of topics and questions." + prompt
|
19 |
+
completions = openai.Completion.create(engine="text-davinci-003", prompt=prompt, max_tokens=4096, n=1, temperature=0.5,) #'gpt-3.5-davinc-turbo-0613',texti-003, gpt-3.5-turbo, gpt-3.5-turbo-0301
|
20 |
message = completions.choices[0].text
|
21 |
return message.strip()
|
22 |
|