SharmaGroups07 commited on
Commit
69bab40
·
verified ·
1 Parent(s): 0eea540

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -5
app.py CHANGED
@@ -28,11 +28,15 @@ def root():
28
 
29
  @app.post("/chat")
30
  def chat(req: ChatRequest):
31
- output = llm(
32
- f"<|user|>{req.message}<|assistant|>",
33
- max_tokens=300,
34
- stop=["<|end|>"]
35
- )
 
 
 
 
36
  return {"reply": output["choices"][0]["text"]}
37
 
38
  # ⭐ THIS PART WAS MISSING
 
28
 
29
  @app.post("/chat")
30
  def chat(req: ChatRequest):
31
+ output = llm(
32
+ f"<|user|>{req.message}<|assistant|>",
33
+ max_tokens=512,
34
+ temperature=0.7,
35
+ top_p=0.9,
36
+ repeat_penalty=1.1,
37
+ stop=["<|end|>"]
38
+ )
39
+
40
  return {"reply": output["choices"][0]["text"]}
41
 
42
  # ⭐ THIS PART WAS MISSING