diff --git a/src/neo4j_graphrag/embeddings/cohere.py b/src/neo4j_graphrag/embeddings/cohere.py index 23da9613..63906a5e 100644 --- a/src/neo4j_graphrag/embeddings/cohere.py +++ b/src/neo4j_graphrag/embeddings/cohere.py @@ -28,8 +28,8 @@ class CohereEmbeddings(Embedder): def __init__(self, model: str = "", **kwargs: Any) -> None: if cohere is None: raise ImportError( - "Could not import cohere python client. " - 'Please install it with `pip install "neo4j-graphrag[cohere]"`.' + """Could not import cohere python client. + Please install it with `pip install "neo4j-graphrag[cohere]"`.""" ) self.model = model self.client = cohere.Client(**kwargs) diff --git a/src/neo4j_graphrag/embeddings/mistral.py b/src/neo4j_graphrag/embeddings/mistral.py index 05bd4f84..8c352263 100644 --- a/src/neo4j_graphrag/embeddings/mistral.py +++ b/src/neo4j_graphrag/embeddings/mistral.py @@ -39,8 +39,8 @@ class MistralAIEmbeddings(Embedder): def __init__(self, model: str = "mistral-embed", **kwargs: Any) -> None: if Mistral is None: raise ImportError( - "Could not import mistralai. " - 'Please install it with `pip install "neo4j-graphrag[mistralai]"`.' + """Could not import mistralai. + Please install it with `pip install "neo4j-graphrag[mistralai]"`.""" ) api_key = kwargs.pop("api_key", None) if api_key is None: diff --git a/src/neo4j_graphrag/embeddings/openai.py b/src/neo4j_graphrag/embeddings/openai.py index 55544153..4a4d6038 100644 --- a/src/neo4j_graphrag/embeddings/openai.py +++ b/src/neo4j_graphrag/embeddings/openai.py @@ -36,8 +36,8 @@ def __init__(self, model: str = "text-embedding-ada-002", **kwargs: Any) -> None import openai except ImportError: raise ImportError( - "Could not import openai python client. " - 'Please install it with `pip install "neo4j-graphrag[openai]"`.' + """Could not import openai python client. + Please install it with `pip install "neo4j-graphrag[openai]"`.""" ) self.openai = openai self.model = model diff --git a/src/neo4j_graphrag/embeddings/sentence_transformers.py b/src/neo4j_graphrag/embeddings/sentence_transformers.py index 503aa6b8..f30ed5b7 100644 --- a/src/neo4j_graphrag/embeddings/sentence_transformers.py +++ b/src/neo4j_graphrag/embeddings/sentence_transformers.py @@ -28,8 +28,8 @@ def __init__( import torch except ImportError: raise ImportError( - "Could not import sentence_transformers python package. " - 'Please install it with `pip install "neo4j-graphrag[sentence-transformers]"`.' + """Could not import sentence_transformers python package. + Please install it with `pip install "neo4j-graphrag[sentence-transformers]"`.""" ) self.torch = torch self.np = np diff --git a/src/neo4j_graphrag/embeddings/vertexai.py b/src/neo4j_graphrag/embeddings/vertexai.py index f226ff06..5aecdcfa 100644 --- a/src/neo4j_graphrag/embeddings/vertexai.py +++ b/src/neo4j_graphrag/embeddings/vertexai.py @@ -36,8 +36,8 @@ class VertexAIEmbeddings(Embedder): def __init__(self, model: str = "text-embedding-004") -> None: if vertexai is None: raise ImportError( - "Could not import Vertex AI Python client. " - 'Please install it with `pip install "neo4j-graphrag[google]"`.' + """Could not import Vertex AI Python client. + Please install it with `pip install "neo4j-graphrag[google]"`.""" ) self.vertexai_model = ( vertexai.language_models.TextEmbeddingModel.from_pretrained(model) diff --git a/src/neo4j_graphrag/llm/anthropic_llm.py b/src/neo4j_graphrag/llm/anthropic_llm.py index 3c800e24..e8f551cb 100644 --- a/src/neo4j_graphrag/llm/anthropic_llm.py +++ b/src/neo4j_graphrag/llm/anthropic_llm.py @@ -55,8 +55,8 @@ def __init__( import anthropic except ImportError: raise ImportError( - "Could not import Anthropic Python client. " - 'Please install it with `pip install "neo4j-graphrag[anthropic]"`.' + """Could not import Anthropic Python client. + Please install it with `pip install "neo4j-graphrag[anthropic]"`.""" ) super().__init__(model_name, model_params) self.anthropic = anthropic diff --git a/src/neo4j_graphrag/llm/cohere_llm.py b/src/neo4j_graphrag/llm/cohere_llm.py index 9ee80dc3..aeddafd3 100644 --- a/src/neo4j_graphrag/llm/cohere_llm.py +++ b/src/neo4j_graphrag/llm/cohere_llm.py @@ -53,8 +53,8 @@ def __init__( import cohere except ImportError: raise ImportError( - "Could not import cohere python client. " - 'Please install it with `pip install "neo4j-graphrag[cohere]"`.' + """Could not import cohere python client. + Please install it with `pip install "neo4j-graphrag[cohere]"`.""" ) self.cohere = cohere diff --git a/src/neo4j_graphrag/llm/mistralai_llm.py b/src/neo4j_graphrag/llm/mistralai_llm.py index ac2793d0..b9254ffe 100644 --- a/src/neo4j_graphrag/llm/mistralai_llm.py +++ b/src/neo4j_graphrag/llm/mistralai_llm.py @@ -53,8 +53,8 @@ def __init__( """ if Mistral is None: raise ImportError( - "Could not import Mistral Python client. " - 'Please install it with `pip install "neo4j-graphrag[mistralai]"`.' + """Could not import Mistral Python client. + Please install it with `pip install "neo4j-graphrag[mistralai]"`.""" ) super().__init__(model_name, model_params) api_key = kwargs.pop("api_key", None) diff --git a/src/neo4j_graphrag/llm/openai_llm.py b/src/neo4j_graphrag/llm/openai_llm.py index f211a4f2..9de5071f 100644 --- a/src/neo4j_graphrag/llm/openai_llm.py +++ b/src/neo4j_graphrag/llm/openai_llm.py @@ -50,8 +50,8 @@ def __init__( import openai except ImportError: raise ImportError( - "Could not import openai Python client. " - 'Please install it with `pip install "neo4j-graphrag[openai]"`.' + """Could not import openai Python client. + Please install it with `pip install "neo4j-graphrag[openai]"`.""" ) self.openai = openai super().__init__(model_name, model_params) diff --git a/src/neo4j_graphrag/llm/vertexai_llm.py b/src/neo4j_graphrag/llm/vertexai_llm.py index ffebfd41..dff5e1cf 100644 --- a/src/neo4j_graphrag/llm/vertexai_llm.py +++ b/src/neo4j_graphrag/llm/vertexai_llm.py @@ -59,8 +59,8 @@ def __init__( ): if GenerativeModel is None or ResponseValidationError is None: raise ImportError( - "Could not import Vertex AI Python client. " - 'Please install it with `pip install "neo4j-graphrag[google]"`.' + """Could not import Vertex AI Python client. + Please install it with `pip install "neo4j-graphrag[google]"`.""" ) super().__init__(model_name, model_params) self.model = GenerativeModel(model_name=model_name, **kwargs)