Spaces:
Sleeping
Sleeping
vhr1007
commited on
Commit
•
a6cce41
1
Parent(s):
36331f1
redeploy for prod
Browse files- app.py +3 -2
- services/qdrant_searcher.py +1 -0
app.py
CHANGED
@@ -97,9 +97,10 @@ async def search_documents(
|
|
97 |
|
98 |
# Encode the query using the custom embedding function
|
99 |
query_embedding = embed_text(body.query)
|
100 |
-
|
101 |
collection_name = "embed" # Use the collection name where the embeddings are stored
|
102 |
|
|
|
103 |
# Perform search using the precomputed embeddings
|
104 |
hits, error = searcher.search_documents(collection_name, query_embedding, user_id, body.limit)
|
105 |
|
@@ -130,7 +131,7 @@ async def generate_rag_response_api(
|
|
130 |
|
131 |
# Encode the query using the custom embedding function
|
132 |
query_embedding = embed_text(body.search_query)
|
133 |
-
|
134 |
collection_name = "embed" # Use the collection name where the embeddings are stored
|
135 |
# Perform search using the precomputed embeddings
|
136 |
hits, error = searcher.search_documents(collection_name, query_embedding, user_id)
|
|
|
97 |
|
98 |
# Encode the query using the custom embedding function
|
99 |
query_embedding = embed_text(body.query)
|
100 |
+
print(body.query)
|
101 |
collection_name = "embed" # Use the collection name where the embeddings are stored
|
102 |
|
103 |
+
logging.info("Performing search using the precomputed embeddings")
|
104 |
# Perform search using the precomputed embeddings
|
105 |
hits, error = searcher.search_documents(collection_name, query_embedding, user_id, body.limit)
|
106 |
|
|
|
131 |
|
132 |
# Encode the query using the custom embedding function
|
133 |
query_embedding = embed_text(body.search_query)
|
134 |
+
print(body.query)
|
135 |
collection_name = "embed" # Use the collection name where the embeddings are stored
|
136 |
# Perform search using the precomputed embeddings
|
137 |
hits, error = searcher.search_documents(collection_name, query_embedding, user_id)
|
services/qdrant_searcher.py
CHANGED
@@ -55,4 +55,5 @@ class QdrantSearcher:
|
|
55 |
hits_list.append(hit_info)
|
56 |
|
57 |
logging.info(f"Document search completed with {len(hits_list)} hits")
|
|
|
58 |
return hits_list, None
|
|
|
55 |
hits_list.append(hit_info)
|
56 |
|
57 |
logging.info(f"Document search completed with {len(hits_list)} hits")
|
58 |
+
logging.info(f"Hits: {hits_list}")
|
59 |
return hits_list, None
|