Spaces:
Sleeping
Sleeping
File size: 543 Bytes
81ea4dd 505d18d 81ea4dd f1ba023 81ea4dd 0c320b7 81ea4dd f1ba023 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import os
import openai
openai.api_key = "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"
def helpTalk(input):
response = openai.Completion.create(
model="text-davinci-003",
prompt="Read the users input and respond in such a manner that user is bound to reply.\nInput : I am fine. \n\nOutput : That's great to hear! What happened?\n/#/#\nInput :",
temperature=0.7,
max_tokens=256,
top_p=1,
frequency_penalty=0,
presence_penalty=0,
stop=["/#/#"]
)
text = response["choices"][0]["text"]
return text |