HelpMeTalk / help_me_talk.py
YashGb's picture
Update help_me_talk.py
afdc8c0
raw
history blame
467 Bytes
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 :",
temperature=0.7,
max_tokens=256,
top_p=1,
frequency_penalty=0,
presence_penalty=0,
stop=["/#/#"]
)
text = response["choices"][0]["text"]
return text