matthoffner commited on
Commit
e891fce
Β·
1 Parent(s): e85dbfa

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -2
main.py CHANGED
@@ -33,9 +33,8 @@ class ChatCompletionRequest(BaseModel):
33
 
34
  @app.post("/v1/chat/completions")
35
  async def chat(request: ChatCompletionRequest, response_mode=None):
36
- tokens = llm.tokenize(prompt)
37
  async def server_sent_events(chat_chunks, llm):
38
- yield prompt
39
  for chat_chunk in llm.generate(chat_chunks):
40
  yield llm.detokenize(chat_chunk)
41
  yield ""
 
33
 
34
  @app.post("/v1/chat/completions")
35
  async def chat(request: ChatCompletionRequest, response_mode=None):
36
+ tokens = llm.tokenize(request.prompt)
37
  async def server_sent_events(chat_chunks, llm):
 
38
  for chat_chunk in llm.generate(chat_chunks):
39
  yield llm.detokenize(chat_chunk)
40
  yield ""