Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -23,12 +23,13 @@ index = initialize_vector_store_index()
|
|
23 |
# configure retriever
|
24 |
retriever = VectorIndexRetriever(
|
25 |
index=index,
|
26 |
-
similarity_top_k=
|
27 |
)
|
28 |
|
29 |
def get_response(text, history):
|
30 |
# For simplicity, we are only using the 'text' argument
|
31 |
-
response =
|
|
|
32 |
return response
|
33 |
|
34 |
|
|
|
23 |
# configure retriever
|
24 |
retriever = VectorIndexRetriever(
|
25 |
index=index,
|
26 |
+
similarity_top_k=1,
|
27 |
)
|
28 |
|
29 |
def get_response(text, history):
|
30 |
# For simplicity, we are only using the 'text' argument
|
31 |
+
response = retriever.retrieve(text)
|
32 |
+
r = str(response[0].metadata)+"\n"+response[0].text
|
33 |
return response
|
34 |
|
35 |
|