juliawri commited on
Commit
3935a09
·
verified ·
1 Parent(s): 55db4dd

made chatbot a shopping assistant

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -5,7 +5,8 @@ client = InferenceClient("meta-llama/Llama-3.1-8B-Instruct")
5
 
6
  def respond(message, history):
7
 
8
- messages = [{"role": "system", "content": "You are a friendly chatbot."}]
 
9
 
10
  if history:
11
  messages.extend(history)
@@ -18,7 +19,7 @@ def respond(message, history):
18
  model="meta-llama/Llama-3.1-8B-Instruct",
19
  temperature=0.8,
20
  messages=messages,
21
- max_tokens=100,
22
  stream=True
23
  ):
24
  token = message.choices[0].delta.content
 
5
 
6
  def respond(message, history):
7
 
8
+ messages = [{"role": "system", "content": "You are a shopping assistant. Help the user decide what items to buy based on their price constraints and interests.
9
+ You should always give at least two options in response to questions."}]
10
 
11
  if history:
12
  messages.extend(history)
 
19
  model="meta-llama/Llama-3.1-8B-Instruct",
20
  temperature=0.8,
21
  messages=messages,
22
+ max_tokens=500,
23
  stream=True
24
  ):
25
  token = message.choices[0].delta.content