doyeqkl commited on
Commit
f336ff8
·
verified ·
1 Parent(s): 189cca2

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -49,7 +49,7 @@ class ChatRequest(BaseModel):
49
  @app.post("/v1/chat/completions")
50
  def chat_completions(request: ChatRequest):
51
  if not llm:
52
- raise HTTPException(status_code=503, detail="Модель еще не загружена")
53
 
54
  # Преобразуем сообщения в формат Pydantic dict для llama-cpp
55
  messages_payload = [{"role": m.role, "content": m.content} for m in request.messages]
 
49
  @app.post("/v1/chat/completions")
50
  def chat_completions(request: ChatRequest):
51
  if not llm:
52
+ raise HTTPException(status_code=503, detail="Модель еще не загружена!")
53
 
54
  # Преобразуем сообщения в формат Pydantic dict для llama-cpp
55
  messages_payload = [{"role": m.role, "content": m.content} for m in request.messages]