sharktide commited on
Commit
3c97a95
·
verified ·
1 Parent(s): 3e09c56

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -370,14 +370,14 @@ async def generate_text(
370
  raise HTTPException(400, "messages[] is required")
371
 
372
  total_chars, total_bytes = calculate_messages_size(messages)
373
- if total_chars > MAX_CHAT_PROMPT_CHARS or total_bytes > MAX_CHAT_PROMPT_BYTES:
374
- raise HTTPException(
375
- status_code=413,
376
- detail=(
377
- f"Prompt context too large ({total_chars} chars, {total_bytes} bytes). "
378
- f"Max allowed is {MAX_CHAT_PROMPT_CHARS} chars or {MAX_CHAT_PROMPT_BYTES} bytes."
379
- ),
380
- )
381
 
382
  prompt_text = extract_user_text(messages)
383
 
 
370
  raise HTTPException(400, "messages[] is required")
371
 
372
  total_chars, total_bytes = calculate_messages_size(messages)
373
+ # if total_chars > MAX_CHAT_PROMPT_CHARS or total_bytes > MAX_CHAT_PROMPT_BYTES:
374
+ # raise HTTPException(
375
+ # status_code=413,
376
+ # detail=(
377
+ # f"Prompt context too large ({total_chars} chars, {total_bytes} bytes). "
378
+ # f"Max allowed is {MAX_CHAT_PROMPT_CHARS} chars or {MAX_CHAT_PROMPT_BYTES} bytes."
379
+ # ),
380
+ # )
381
 
382
  prompt_text = extract_user_text(messages)
383