Spaces:
Runtime error
Runtime error
Kushwanth Chowday Kandala
commited on
src property must be a valid json object
Browse files
app.py
CHANGED
|
@@ -88,7 +88,7 @@ def chat_actions():
|
|
| 88 |
# now query vector database
|
| 89 |
result = index.query(query_vector, top_k=5, include_metadata=True) # xc is a list of tuples
|
| 90 |
with st.sidebar:
|
| 91 |
-
st.
|
| 92 |
|
| 93 |
for res in result['matches']:
|
| 94 |
st.session_state["chat_history"].append(
|
|
@@ -97,6 +97,7 @@ def chat_actions():
|
|
| 97 |
"content": f"{round(res['score'],2)}: {res['metadata']['text']}",
|
| 98 |
}, # This can be replaced with your chat response logic
|
| 99 |
)
|
|
|
|
| 100 |
|
| 101 |
|
| 102 |
if "chat_history" not in st.session_state:
|
|
|
|
| 88 |
# now query vector database
|
| 89 |
result = index.query(query_vector, top_k=5, include_metadata=True) # xc is a list of tuples
|
| 90 |
with st.sidebar:
|
| 91 |
+
st.string(type(result))
|
| 92 |
|
| 93 |
for res in result['matches']:
|
| 94 |
st.session_state["chat_history"].append(
|
|
|
|
| 97 |
"content": f"{round(res['score'],2)}: {res['metadata']['text']}",
|
| 98 |
}, # This can be replaced with your chat response logic
|
| 99 |
)
|
| 100 |
+
break;
|
| 101 |
|
| 102 |
|
| 103 |
if "chat_history" not in st.session_state:
|