MCPcopy Create free account
hub / github.com/MLSysU/TD-Pipe / check_model

Function check_model

TD_Pipe/entrypoints/openai/api_server.py:131–138  ·  view source on GitHub ↗
(request)

Source from the content-addressed store, hash-verified

129
130
131async def check_model(request) -> Optional[JSONResponse]:
132 if request.model == served_model:
133 return
134 ret = create_error_response(
135 HTTPStatus.NOT_FOUND,
136 f"The model `{request.model}` does not exist.",
137 )
138 return ret
139
140
141async def check_length(

Callers 2

create_chat_completionFunction · 0.85
create_completionFunction · 0.85

Calls 1

create_error_responseFunction · 0.85

Tested by

no test coverage detected