Lade till ett skelett för /api/endpoints för att dynamiskt kunna fylla listan med möjliga val i client.html
This commit is contained in:
@@ -178,6 +178,18 @@ def chat():
|
|||||||
return jsonify({'error': 'Invalid JSON response from server'}), 500
|
return jsonify({'error': 'Invalid JSON response from server'}), 500
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/api/endpoints', methods=['GET'])
|
||||||
|
def get_endpoints():
|
||||||
|
# Replace this with your actual logic to fetch endpoint data
|
||||||
|
endpoints = [
|
||||||
|
{'endpoint': 'endpoint1', 'llm': 'llm1'},
|
||||||
|
{'endpoint': 'endpoint2', 'llm': 'llm2'},
|
||||||
|
{'endpoint': 'endpoint3', 'llm': 'llm3'},
|
||||||
|
{'endpoint': 'endpoint4', 'llm': 'llm4'},
|
||||||
|
]
|
||||||
|
|
||||||
|
return jsonify(endpoints)
|
||||||
|
|
||||||
|
|
||||||
@app.route('/smartassist', methods=["POST"])
|
@app.route('/smartassist', methods=["POST"])
|
||||||
def smartassist():
|
def smartassist():
|
||||||
|
|||||||
Reference in New Issue
Block a user