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

Method handle_show

src/server/rest_handler.cpp:556–587  ·  view source on GitHub ↗

@brief Handle the show request @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

554///@param send_response the send response
555///@param send_streaming_response the send streaming response
556void RestHandler::handle_show(const json& request,
557 std::function<void(const json&)> send_response,
558 StreamResponseCallback send_streaming_response) {
559 try {
560 std::string model = request["model"];
561 json info = {
562 {"modelfile", ""},
563 {"parameters", ""},
564 {"template", ""},
565 {"details", {
566 {"parent_model", ""},
567 {"format", ""},
568 {"family", ""},
569 {"families", {""}},
570 {"parameter_size", ""},
571 {"quantization_level", ""}
572 }
573 },
574 {"model_info", {
575 {"general.architecture", "flm" }
576 }},
577 {"capabilities", {"chat", "vision", "completion"}}
578 };
579
580
581 send_response(info);
582 }
583 catch (const std::exception& e) {
584 json error_response = { {"error", e.what()} };
585 send_response(error_response);
586 }
587}
588
589///@brief Handle the generate request
590///@param request the request

Callers 1

create_lm_serverFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected