MCPcopy Create free account
hub / github.com/Mrinank-Bhowmick/python-beginner-projects / response

Function response

projects/ImagegenChatbot/gpt3.py:7–15  ·  view source on GitHub ↗
(query)

Source from the content-addressed store, hash-verified

5
6
7def response(query):
8 response = openai.Completion.create(
9 model="text-davinci-003",
10 prompt=query,
11 temperature=0,
12 max_tokens=1000,
13 )
14 data = response["choices"][0]["text"]
15 return data
16
17
18while True:

Callers 1

gpt3.pyFile · 0.85

Calls 1

createMethod · 0.80

Tested by

no test coverage detected