tventurella commited on
Commit
e13b189
·
verified ·
1 Parent(s): 3383140

Update scripts/chat_web.py

Browse files
Files changed (1) hide show
  1. scripts/chat_web.py +5 -5
scripts/chat_web.py CHANGED
@@ -51,10 +51,10 @@ from nanochat.checkpoint_manager import load_model
51
  from nanochat.engine import Engine
52
 
53
  # Victorian system prompt — prepended to first user turn during inference
54
- SYSTEM_PREFIX = (
55
- "[You are a learned Victorian gentleman in conversation. "
56
- "Address the question or remark put to you directly.]\n\n"
57
- )
58
 
59
  # Abuse prevention limits
60
  MAX_MESSAGES_PER_REQUEST = 500
@@ -399,7 +399,7 @@ async def chat_completions(request: ChatRequest):
399
  content = content[0].upper() + content[1:]
400
  # Prepend system prompt to the first user turn
401
  if turn_count == 0:
402
- content = SYSTEM_PREFIX + content
403
  conversation_tokens.append(user_start)
404
  conversation_tokens.extend(worker.tokenizer.encode(content))
405
  conversation_tokens.append(user_end)
 
51
  from nanochat.engine import Engine
52
 
53
  # Victorian system prompt — prepended to first user turn during inference
54
+ # SYSTEM_PREFIX = (
55
+ # "[You are a learned Victorian gentleman in conversation. "
56
+ # "Address the question or remark put to you directly.]\n\n"
57
+ # )
58
 
59
  # Abuse prevention limits
60
  MAX_MESSAGES_PER_REQUEST = 500
 
399
  content = content[0].upper() + content[1:]
400
  # Prepend system prompt to the first user turn
401
  if turn_count == 0:
402
+ content = content
403
  conversation_tokens.append(user_start)
404
  conversation_tokens.extend(worker.tokenizer.encode(content))
405
  conversation_tokens.append(user_end)