Skip to content

Commit

Permalink
fix: update weaviate EmbeddedOptions import path
Browse files Browse the repository at this point in the history
Updates the import of EmbeddedOptions in storage_engine.py to use the new
recommended path from weaviate.embedded, resolving the Dep010 deprecation
warning.
  • Loading branch information
lukehinds committed Dec 2, 2024
1 parent 8c1fba2 commit 5895bcb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/codegate/storage/storage_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:
Expand Down

0 comments on commit 5895bcb

Please sign in to comment.