MCPcopy
hub / github.com/microsoft/JARVIS / results

Function results

hugginggpt/server/awesome_chat.py:1038–1047  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1036 @cross_origin()
1037 @app.route('/results', methods=['POST'])
1038 def results():
1039 data = request.get_json()
1040 messages = data["messages"]
1041 api_key = data.get("api_key", API_KEY)
1042 api_endpoint = data.get("api_endpoint", API_ENDPOINT)
1043 api_type = data.get("api_type", API_TYPE)
1044 if api_key is None or api_type is None or api_endpoint is None:
1045 return jsonify({"error": "Please provide api_key, api_type and api_endpoint"})
1046 response = chat_huggingface(messages, api_key, api_type, api_endpoint, return_results=True)
1047 return jsonify(response)
1048
1049 @cross_origin()
1050 @app.route('/hugginggpt', methods=['POST'])

Callers

nothing calls this directly

Calls 1

chat_huggingfaceFunction · 0.85

Tested by

no test coverage detected