mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2025-09-10 15:29:39 +00:00
add check parameters
This commit is contained in:
parent
c995bdbbfa
commit
99540ad01f
2 changed files with 0 additions and 20 deletions
|
@ -14,16 +14,6 @@ router = APIRouter()
|
|||
@router.post("/completions",tags=['openai'])
|
||||
async def create_completion(request:Request, create:CompletionCreate):
|
||||
id = str(uuid4())
|
||||
if create.model != Config().model_name:
|
||||
return JSONResponse(
|
||||
status_code=400,
|
||||
content={
|
||||
"error": {
|
||||
"message": "Model not found",
|
||||
"code": 404,
|
||||
"type": "NotFound"
|
||||
}
|
||||
})
|
||||
if create.max_tokens<0:
|
||||
return JSONResponse(
|
||||
status_code=400,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue