Closed sweep-nightly[bot] closed 4 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
sweep-chat | 🔄 Building (Inspect) | Visit Preview | 💬 Add feedback | Jun 21, 2024 2:02am |
sweep-chat-demo | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 21, 2024 2:02am |
sweep-docs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 21, 2024 2:02am |
sweep-pulley | 🔄 Building (Inspect) | Visit Preview | 💬 Add feedback | Jun 21, 2024 2:02am |
Purpose
This pull request adds unit tests for the
vector_db.py
file, which contains the main implementation of the vector database functionality.Description
The changes include:
test_vector_db.py
in thesweepai/core/
directory.embed_text_array
openai_call_embedding
normalize_l2
cosine_similarity
multi_get_query_texts_similarity
embed_text_array
to avoid calling the actual OpenAI API during testing.if __name__ == "__main__":
block to allow running the tests directly from the file.Summary
test_vector_db.py
file insweepai/core/
directoryvector_db.py
embed_text_array
to avoid external API callsSuggested changes from Sweep Chat by @kevinlu1248. Continue chatting at http://localhost:3000/c/16ef85d9-bfe6-4427-ad23-cfa483609ee2.