MCPcopy Create free account
hub / github.com/FastFlowLM/FastFlowLM / handle_models_openai

Method handle_models_openai

src/server/rest_handler.cpp:913–924  ·  view source on GitHub ↗

@brief Handle the models request (open ai) @param request the request @param send_response the send response @param send_streaming_response the send streaming response

Source from the content-addressed store, hash-verified

911///@param send_response the send response
912///@param send_streaming_response the send streaming response
913void RestHandler::handle_models_openai(const json& request,
914 std::function<void(const json&)> send_response,
915 StreamResponseCallback send_streaming_response) {
916 try {
917 json models = supported_models.get_all_models_openai();
918 send_response(models);
919 }
920 catch (const std::exception& e) {
921 json error_response = { {"error", e.what()} };
922 send_response(error_response);
923 }
924}
925
926///@brief Handle the ps request
927///@param request the request

Callers 1

create_lm_serverFunction · 0.80

Calls 1

get_all_models_openaiMethod · 0.80

Tested by

no test coverage detected