bstraehle commited on
Commit
081537e
·
verified ·
1 Parent(s): 9c1fe60

Update custom_utils.py

Browse files
Files changed (1) hide show
  1. custom_utils.py +7 -6
custom_utils.py CHANGED
@@ -111,12 +111,12 @@ def vector_search(openai_api_key, user_query, db, collection, additional_stages=
111
  "path": "description_embedding",
112
  "numCandidates": 150,
113
  "limit": 20,
114
- #"filter": {
115
- # "$and": [
116
- # {"accommodates": {"$eq": 2}},
117
- # {"bedrooms": {"$eq": 1}}
118
- # ]
119
- #},
120
  }
121
  }
122
 
@@ -139,6 +139,7 @@ def vector_search(openai_api_key, user_query, db, collection, additional_stages=
139
  return list(results)
140
 
141
  def get_text_embedding(openai_api_key, text):
 
142
  if not text or not isinstance(text, str):
143
  return None
144
 
 
111
  "path": "description_embedding",
112
  "numCandidates": 150,
113
  "limit": 20,
114
+ "filter": {
115
+ "$and": [
116
+ {"accommodates": {"$eq": 2}},
117
+ {"bedrooms": {"$eq": 1}}
118
+ ]
119
+ },
120
  }
121
  }
122
 
 
139
  return list(results)
140
 
141
  def get_text_embedding(openai_api_key, text):
142
+ print(f"### {text}")
143
  if not text or not isinstance(text, str):
144
  return None
145