mingbaer commited on
Commit
efc7bd6
·
verified ·
1 Parent(s): 603aeba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -41,7 +41,7 @@ client = InferenceClient("HuggingFaceH4/zephyr-7b-beta", provider="hf-inference"
41
  def respond(message, history):
42
 
43
  info = pull_relevant_info(message, top_k=3)
44
- system_message = (f"You are a friendly chatbot. Use the following information to help answer the user's question:\n\n{info}\n\n")
45
  messages = [{"role": "system", "content": system_message}]
46
 
47
  if history:
@@ -53,7 +53,7 @@ def respond(message, history):
53
 
54
  for message_chunk in client.chat_completion(
55
  messages,
56
- max_tokens=100,
57
  stream=True
58
  ):
59
  token = message_chunk['choices'][0]['delta'].get('content', '')
 
41
  def respond(message, history):
42
 
43
  info = pull_relevant_info(message, top_k=3)
44
+ system_message = (f"You are a helpful and kind teacher. You respond clearly in no more than three complete sentences. Use the following information to help answer the user's question:\n\n{info}\n\n")
45
  messages = [{"role": "system", "content": system_message}]
46
 
47
  if history:
 
53
 
54
  for message_chunk in client.chat_completion(
55
  messages,
56
+ max_tokens=1000,
57
  stream=True
58
  ):
59
  token = message_chunk['choices'][0]['delta'].get('content', '')