Uhhy commited on
Commit
d7df29a
1 Parent(s): 5726c3f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -122,7 +122,7 @@ def select_best_response(responses):
122
  @app.post("/generate_chat")
123
  async def generate_chat(request: ChatRequest):
124
  if not request.message.strip():
125
- raise HTTPException(status_code=400, detail="The message cannot be empty.")
126
 
127
  responses = []
128
  num_models = len(global_data['models'])
@@ -137,7 +137,7 @@ async def generate_chat(request: ChatRequest):
137
  pass
138
 
139
  if not responses:
140
- raise HTTPException(status_code=500, detail="Error: No se generaron respuestas.")
141
 
142
  best_response = select_best_response(responses)
143
 
 
122
  @app.post("/generate_chat")
123
  async def generate_chat(request: ChatRequest):
124
  if not request.message.strip():
125
+ raise HTTPException(status_code=400, detail="Error: No message provided.")
126
 
127
  responses = []
128
  num_models = len(global_data['models'])
 
137
  pass
138
 
139
  if not responses:
140
+ raise HTTPException(status_code=500, detail="Error: No responses generated.")
141
 
142
  best_response = select_best_response(responses)
143