SharmaGroups07 commited on
Commit
48b1cf8
·
verified ·
1 Parent(s): 23e0603

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -30,9 +30,13 @@ def root():
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
 
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