Skip to content

Commit bdd87b4

Browse files
committed
Removed sentence_transformers from init
1 parent fbe0079 commit bdd87b4

File tree

6 files changed

+47
-8
lines changed

6 files changed

+47
-8
lines changed

docs/source/user_guide.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ The `OpenAIEmbedder` was illustrated previously. Here is how to use the `Sentenc
266266

267267
.. code:: python
268268
269-
from neo4j_genai.embeddings import SentenceTransformerEmbeddings
269+
from neo4j_genai.embeddings.sentence_transformers import SentenceTransformerEmbeddings
270270
271271
embedder = SentenceTransformerEmbeddings(model="all-MiniLM-L6-v2") # Note: this is the default model
272272

examples/graphrag.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
URI = "neo4j://localhost:7687"
2020
AUTH = ("neo4j", "password")
2121
DATABASE = "neo4j"
22-
INDEX = "vector-index-name"
22+
INDEX = "moviePlotsEmbedding"
2323

2424

2525
# setup logger config
Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1-
from .sentence_transformers import SentenceTransformerEmbeddings
2-
3-
__all__ = [
4-
"SentenceTransformerEmbeddings",
5-
]
1+
# Copyright (c) "Neo4j"
2+
# Neo4j Sweden AB [https://neo4j.com]
3+
# #
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
# #
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
# #
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.

src/neo4j_genai/embeddings/openai.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# Copyright (c) "Neo4j"
2+
# Neo4j Sweden AB [https://neo4j.com]
3+
# #
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
# #
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
# #
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
116
from __future__ import annotations
217

318
from typing import Any

src/neo4j_genai/embeddings/sentence_transformers.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# Copyright (c) "Neo4j"
2+
# Neo4j Sweden AB [https://neo4j.com]
3+
# #
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
# #
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
# #
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
116
from typing import Any
217

318
import numpy as np

tests/unit/embeddings/test_sentence_transformers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import numpy as np
44
import pytest
55
from neo4j_genai.embedder import Embedder
6-
from neo4j_genai.embeddings import SentenceTransformerEmbeddings
6+
from neo4j_genai.embeddings.sentence_transformers import SentenceTransformerEmbeddings
77

88

99
@patch("sentence_transformers.SentenceTransformer")

0 commit comments

Comments
 (0)