Spaces:
Sleeping
Sleeping
Update utils.py
Browse files
utils.py
CHANGED
@@ -23,8 +23,7 @@ def create_open_ai_query(input_query, system_message=None, model_engine=OPEN_AI_
|
|
23 |
messages.append({"role": "user", "content": input_query})
|
24 |
payload = {
|
25 |
'model': model_engine,
|
26 |
-
'messages': messages
|
27 |
-
'stream': True
|
28 |
}
|
29 |
response = requests.post(openai_url, headers=headers, data=json.dumps(payload))
|
30 |
if response.status_code == 200 and 'choices' in response.json():
|
|
|
23 |
messages.append({"role": "user", "content": input_query})
|
24 |
payload = {
|
25 |
'model': model_engine,
|
26 |
+
'messages': messages
|
|
|
27 |
}
|
28 |
response = requests.post(openai_url, headers=headers, data=json.dumps(payload))
|
29 |
if response.status_code == 200 and 'choices' in response.json():
|