Skip to content

Commit

Permalink
first commit, creating PR
Browse files Browse the repository at this point in the history
  • Loading branch information
star-nox committed Oct 24, 2023
1 parent 89f61aa commit 4c3e6a9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ai_ta_backend/vector_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ def getAll(
return distinct_dicts

def vector_search(self, search_query, course_name):
top_n = 80
top_n = 5
o = OpenAIEmbeddings() # type: ignore
user_query_embedding = o.embed_query(search_query)
myfilter = models.Filter(
Expand All @@ -955,6 +955,11 @@ def vector_search(self, search_query, course_name):
)

print("search_results", search_results)
print("\n")
for i in search_results:
print("scores: ", i.score)
print("payload: ", i.payload['metadata'])
exit()
found_docs: list[Document] = []
for d in search_results:
metadata = d.payload.get('metadata') # type: ignore
Expand Down

0 comments on commit 4c3e6a9

Please sign in to comment.