Update project/bot/openai_backend.py
Browse files
project/bot/openai_backend.py
CHANGED
@@ -96,7 +96,7 @@ class SearchBot:
|
|
96 |
|
97 |
@staticmethod
|
98 |
async def _get_context_data(user_query: list[float]) -> list[dict]:
|
99 |
-
radius =
|
100 |
_, distances, indices = settings.FAISS_INDEX.range_search(user_query, radius)
|
101 |
indices_distances_df = pd.DataFrame({'index': indices, 'distance': distances})
|
102 |
filtered_data_df = settings.products_dataset.iloc[indices].copy()
|
|
|
96 |
|
97 |
@staticmethod
|
98 |
async def _get_context_data(user_query: list[float]) -> list[dict]:
|
99 |
+
radius = 5
|
100 |
_, distances, indices = settings.FAISS_INDEX.range_search(user_query, radius)
|
101 |
indices_distances_df = pd.DataFrame({'index': indices, 'distance': distances})
|
102 |
filtered_data_df = settings.products_dataset.iloc[indices].copy()
|