|
|
|
|
|
|
|
|
return client |
|
|
return client |
|
|
try: |
|
|
try: |
|
|
client.create_full_text_index() |
|
|
client.create_full_text_index() |
|
|
|
|
|
redis_client.set(collection_exist_cache_key, 1, ex=3600) |
|
|
except Exception: |
|
|
except Exception: |
|
|
logger.exception("Failed to create full text index") |
|
|
logger.exception("Failed to create full text index") |
|
|
redis_client.set(collection_exist_cache_key, 1, ex=3600) |
|
|
|
|
|
return client |
|
|
return client |
|
|
|
|
|
|
|
|
def add_texts(self, documents: list[Document], embeddings: list[list[float]], **kwargs): |
|
|
def add_texts(self, documents: list[Document], embeddings: list[list[float]], **kwargs): |