sabatale commited on
Commit
351d301
·
verified ·
1 Parent(s): c2cc956

Update utils/haystack.py

Browse files
Files changed (1) hide show
  1. utils/haystack.py +5 -5
utils/haystack.py CHANGED
@@ -10,7 +10,7 @@ from haystack import Document
10
 
11
  def start_haystack(openai_key):
12
  document_store = PineconeDocumentStore(dimension=1024, index="zen", environment = "gcp-starter")
13
- query = "It doesn't work on Android. The app is not blocking call!!!"
14
 
15
  template = """
16
  You are a support agent replying to customers' messages. Use the context to answer the customer, starting by greeting them and ending with goodbyes.
@@ -46,17 +46,17 @@ def start_haystack(openai_key):
46
 
47
 
48
  @st.cache_data(show_spinner=True)
49
- def query(username, _pipeline):
50
  try:
51
  replies = pipe.run({
52
  "text_embedder": {
53
- "text": query
54
  },
55
  "prompt_builder": {
56
- "query": query
57
  },
58
  "answer_builder": {
59
- "query": query
60
  }
61
  })
62
 
 
10
 
11
  def start_haystack(openai_key):
12
  document_store = PineconeDocumentStore(dimension=1024, index="zen", environment = "gcp-starter")
13
+ question = "It doesn't work on Android. The app is not blocking call!!!"
14
 
15
  template = """
16
  You are a support agent replying to customers' messages. Use the context to answer the customer, starting by greeting them and ending with goodbyes.
 
46
 
47
 
48
  @st.cache_data(show_spinner=True)
49
+ def query(pipe):
50
  try:
51
  replies = pipe.run({
52
  "text_embedder": {
53
+ "text": question
54
  },
55
  "prompt_builder": {
56
+ "query": question
57
  },
58
  "answer_builder": {
59
+ "query": question
60
  }
61
  })
62