Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,7 +18,7 @@ def chat_completions():
|
|
| 18 |
|
| 19 |
response_data = response.json()
|
| 20 |
|
| 21 |
-
if 'model' in response_data and response_data['model'] == '
|
| 22 |
response_data['model'] = 'openai'
|
| 23 |
|
| 24 |
return jsonify(response_data), response.status_code
|
|
@@ -29,4 +29,4 @@ def chat_completions():
|
|
| 29 |
return jsonify({'error': 'Invalid JSON response from target server'}), 500
|
| 30 |
|
| 31 |
if __name__ == '__main__':
|
| 32 |
-
app.run(host=
|
|
|
|
| 18 |
|
| 19 |
response_data = response.json()
|
| 20 |
|
| 21 |
+
if 'model' in response_data and response_data['model'] == 'instant':
|
| 22 |
response_data['model'] = 'openai'
|
| 23 |
|
| 24 |
return jsonify(response_data), response.status_code
|
|
|
|
| 29 |
return jsonify({'error': 'Invalid JSON response from target server'}), 500
|
| 30 |
|
| 31 |
if __name__ == '__main__':
|
| 32 |
+
app.run(host='localhost', port=5000, debug=True)
|