YashGb commited on
Commit
1823ab5
·
1 Parent(s): 45e0bec

Delete help_me_talk.py

Browse files
Files changed (1) hide show
  1. help_me_talk.py +0 -22
help_me_talk.py DELETED
@@ -1,22 +0,0 @@
1
- import os
2
- import openai
3
-
4
- openai.api_key = os.getenv("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")
5
-
6
- def helpTalk(input):
7
- response = openai.Completion.create(
8
- model="text-davinci-003",
9
- 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! How has your day been?\n/#/#\nInput :",
10
- temperature=0.7,
11
- max_tokens=256,
12
- top_p=1,
13
- frequency_penalty=0,
14
- presence_penalty=0,
15
- stop=["/#/#"]
16
- )
17
- text = response["choices"][0]["text"]
18
- text = text.replace("\n","")
19
- start = text.find("Output:") + 5
20
- end = len(text)
21
- text = text[start:end].strip()
22
- return text