Skip to content

Commit 6468084

Browse files
Update the comments of ov_langchain_helper.py (#3062)
Co-authored-by: Aleksandr Mokrov <[email protected]>
1 parent 2a62dc2 commit 6468084

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

notebooks/llm-rag-langchain/ov_langchain_helper.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ class OpenVINOLLM(LLM):
4747
Example using from_model_path:
4848
.. code-block:: python
4949
50-
from langchain_community.llms import OpenVINOLLM
51-
ov = OpenVINOPipeline.from_model_path(
50+
from ov_langchain_helper import OpenVINOLLM
51+
ov = OpenVINOLLM.from_model_path(
5252
model_path="./openvino_model_dir",
5353
device="CPU",
5454
)
@@ -58,7 +58,7 @@ class OpenVINOLLM(LLM):
5858
import openvino_genai
5959
pipe = openvino_genai.LLMPipeline("./openvino_model_dir", "CPU")
6060
config = openvino_genai.GenerationConfig()
61-
ov = OpenVINOPipeline.from_model_path(
61+
ov = OpenVINOLLM.from_model_path(
6262
ov_pipe=pipe,
6363
config=config,
6464
)
@@ -323,7 +323,7 @@ class OpenVINOEmbeddings(BaseModel, Embeddings):
323323
Example:
324324
.. code-block:: python
325325
326-
from langchain_community.embeddings import OpenVINOEmbeddings
326+
from ov_langchain_helper import OpenVINOEmbeddings
327327
328328
model_name = "sentence-transformers/all-mpnet-base-v2"
329329
model_kwargs = {'device': 'CPU'}
@@ -505,7 +505,7 @@ class OpenVINOBgeEmbeddings(OpenVINOEmbeddings):
505505
Bge Example:
506506
.. code-block:: python
507507
508-
from langchain_community.embeddings import OpenVINOBgeEmbeddings
508+
from ov_langchain_helper import OpenVINOBgeEmbeddings
509509
510510
model_name = "BAAI/bge-large-en-v1.5"
511511
model_kwargs = {'device': 'CPU'}
@@ -564,11 +564,11 @@ class OpenVINOGenAIEmbeddings(BaseModel, Embeddings):
564564
Example:
565565
.. code-block:: python
566566
567-
from langchain_community.embeddings import OpenVINOGenAIEmbeddings
567+
from ov_langchain_helper import OpenVINOGenAIEmbeddings
568568
569569
model_path = "./sentence-transformers/all-mpnet-base-v2"
570570
encode_kwargs = {'normalize_embeddings': True}
571-
ov = OpenVINOEmbeddings.from_model_path(
571+
ov = OpenVINOGenAIEmbeddings.from_model_path(
572572
model_path=model_path,
573573
device="CPU",
574574
encode_kwargs=encode_kwargs,

0 commit comments

Comments
 (0)