MCPcopy Index your code
hub / github.com/geekcomputers/Python / ask_gpt3

Function ask_gpt3

nitkarshchourasia/to_sort/JARVIS_python_bot/JARVIS_2.0.py:96–109  ·  view source on GitHub ↗
(que)

Source from the content-addressed store, hash-verified

94
95
96def ask_gpt3(que):
97 openai.api_key = api_key
98
99 response = openai.Completion.create(
100 engine="text-davinci-002",
101 prompt=f"Answer the following question: {question}\n",
102 max_tokens=150,
103 n=1,
104 stop=None,
105 temperature=0.7,
106 )
107
108 answer = response.choices[0].text.strip()
109 return answer
110
111
112def wishme():

Callers 1

get_appFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected