Skip to content

Commit

Permalink
feat: embedding dimension from async
Browse files Browse the repository at this point in the history
  • Loading branch information
vikyw89 committed Jul 8, 2024
1 parent 6b6a4e5 commit 66b9861
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/vanna/qdrant/qdrant.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,12 +380,8 @@ async def aremove_collection(self, collection_name: str) -> bool:

@cached_property
def embeddings_dimension(self):
if self._client:
return len(self.generate_embedding("ABCDEF"))
elif self._async_client:
import asyncio
return len(asyncio.run(self.agenerate_embedding("ABCDEF")))
return 0
import asyncio
return len(asyncio.run(self.agenerate_embedding("ABCDEF")))

def get_similar_question_sql(self, question: str, **kwargs) -> list:
results = self._client.search(
Expand Down

0 comments on commit 66b9861

Please sign in to comment.