From 5895bcb46e81ef5e432a8dcab9a1b848693f3b1f Mon Sep 17 00:00:00 2001 From: Luke Hinds Date: Mon, 2 Dec 2024 20:40:16 +0000 Subject: [PATCH] fix: update weaviate EmbeddedOptions import path Updates the import of EmbeddedOptions in storage_engine.py to use the new recommended path from weaviate.embedded, resolving the Dep010 deprecation warning. --- src/codegate/storage/storage_engine.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/codegate/storage/storage_engine.py b/src/codegate/storage/storage_engine.py index b27cac7a..af019a64 100644 --- a/src/codegate/storage/storage_engine.py +++ b/src/codegate/storage/storage_engine.py @@ -2,6 +2,7 @@ import weaviate from weaviate.classes.config import DataType from weaviate.classes.query import MetadataQuery +from weaviate.embedded import EmbeddedOptions from codegate.inference.inference_engine import LlamaCppInferenceEngine @@ -24,7 +25,7 @@ class StorageEngine: def get_client(self, data_path): try: client = weaviate.WeaviateClient( - embedded_options=weaviate.EmbeddedOptions(persistence_data_path=data_path), + embedded_options=EmbeddedOptions(persistence_data_path=data_path), ) return client except Exception as e: