Update chatgpt_api.py
Browse files- chatgpt_api.py +1 -2
chatgpt_api.py
CHANGED
@@ -11,8 +11,7 @@ def get_chatgpt_response(input_text):
|
|
11 |
}
|
12 |
data = {
|
13 |
"model": "gpt-4",
|
14 |
-
"messages": [{"role": "user", "content": input_text}]
|
15 |
-
"max_tokens":8096
|
16 |
}
|
17 |
response = requests.post("https://api.openai.com/v1/chat/completions", headers=headers, json=data)
|
18 |
response_json = response.json()
|
|
|
11 |
}
|
12 |
data = {
|
13 |
"model": "gpt-4",
|
14 |
+
"messages": [{"role": "user", "content": input_text}]
|
|
|
15 |
}
|
16 |
response = requests.post("https://api.openai.com/v1/chat/completions", headers=headers, json=data)
|
17 |
response_json = response.json()
|