zakerytclarke commited on
Commit
bd5c379
·
verified ·
1 Parent(s): d4fe268

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -28,9 +28,9 @@ def brave_search(query, count=3):
28
  return []
29
 
30
  @traceable
31
- def query_teapot(context, user_input, teapot_ai):
32
  response = teapot_ai.query(
33
- context=context,
34
  query=user_input
35
  )
36
 
@@ -47,7 +47,7 @@ def handle_chat(user_input, teapot_ai):
47
  print(documents)
48
 
49
  context="\n".join(documents)
50
-
51
  response = query_teapot(context, user_input, teapot_ai)
52
 
53
  # response = teapot_ai.chat([
 
28
  return []
29
 
30
  @traceable
31
+ def query_teapot(prompt, context, user_input, teapot_ai):
32
  response = teapot_ai.query(
33
+ context=prompt+"\n"+context,
34
  query=user_input
35
  )
36
 
 
47
  print(documents)
48
 
49
  context="\n".join(documents)
50
+ prompt = "You are Teapot, an open-source AI assistant optimized for low-end devices, providing short, accurate responses without hallucinating while excelling at information extraction and text summarization."
51
  response = query_teapot(context, user_input, teapot_ai)
52
 
53
  # response = teapot_ai.chat([