Update utils/haystack.py
Browse files- utils/haystack.py +5 -7
utils/haystack.py
CHANGED
|
@@ -45,19 +45,17 @@ def start_haystack(openai_key):
|
|
| 45 |
|
| 46 |
|
| 47 |
@st.cache_data(show_spinner=True)
|
| 48 |
-
def query(
|
| 49 |
-
try:
|
| 50 |
-
question = "It doesn't work on Android. The app is not blocking call!!!"
|
| 51 |
-
|
| 52 |
replies = _pipe.run({
|
| 53 |
"text_embedder": {
|
| 54 |
-
"text":
|
| 55 |
},
|
| 56 |
"prompt_builder": {
|
| 57 |
-
"query":
|
| 58 |
},
|
| 59 |
"answer_builder": {
|
| 60 |
-
"query":
|
| 61 |
}
|
| 62 |
})
|
| 63 |
|
|
|
|
| 45 |
|
| 46 |
|
| 47 |
@st.cache_data(show_spinner=True)
|
| 48 |
+
def query(prompt, _pipe):
|
| 49 |
+
try:
|
|
|
|
|
|
|
| 50 |
replies = _pipe.run({
|
| 51 |
"text_embedder": {
|
| 52 |
+
"text": prompt
|
| 53 |
},
|
| 54 |
"prompt_builder": {
|
| 55 |
+
"query": prompt
|
| 56 |
},
|
| 57 |
"answer_builder": {
|
| 58 |
+
"query": prompt
|
| 59 |
}
|
| 60 |
})
|
| 61 |
|