Skip to content

Commit

Permalink
Formatted with ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
am-kinetica committed Feb 13, 2024
1 parent 8c58988 commit e2598b2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions libs/community/langchain_community/vectorstores/kinetica.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ class Kinetica(VectorStore):
)
"""


def __init__(
self,
config: KineticaSettings,
Expand Down Expand Up @@ -794,13 +793,13 @@ def from_texts(

if len(texts) == 0:
raise ValueError("texts is empty")

try:
first_embedding = embedding.embed_documents(texts[0:1])
except NotImplementedError:
first_embedding = [embedding.embed_query(texts[0])]

dimensions= len(first_embedding[0])
dimensions = len(first_embedding[0])
embeddings = embedding.embed_documents(list(texts))

kinetica_store = cls.__from(
Expand All @@ -816,7 +815,7 @@ def from_texts(
pre_delete_collection=pre_delete_collection,
**kwargs,
)

return kinetica_store

@classmethod
Expand Down

0 comments on commit e2598b2

Please sign in to comment.