fix: correct spelling mistakes of "seperate, intialise, pre-defined" (#14647)

fix spellings

**seperate -> separate**: found more occurrences, see
https://github.com/langchain-ai/langchain/pull/14602
**initialise -> intialize**: the latter is more common in the repo
**pre-defined > predefined**: adding a comma after a prefix is a
delicate matter, but this is a generally accepted word

also, another word that appears in the repo is "fs" (stands for
filesystem), e.g., in `libs/core/langchain_core/prompts/loading.py`
` """Unified method for loading a prompt from LangChainHub or local
fs."""`
Isn't "filesystem" better?
This commit is contained in:
Ran
2023-12-22 21:49:35 +02:00
committed by GitHub
parent 86d27fd684
commit c3f8733aef
14 changed files with 15 additions and 15 deletions

View File

@@ -58,7 +58,7 @@ class GCSFileLoader(BaseLoader):
"Please install it with `pip install google-cloud-storage`."
)
# Initialise a client
# initialize a client
storage_client = storage.Client(
self.project_name, client_info=get_client_info("google-cloud-storage")
)

View File

@@ -18,7 +18,7 @@ class BSHTMLLoader(BaseLoader):
bs_kwargs: Union[dict, None] = None,
get_text_separator: str = "",
) -> None:
"""Initialise with path, and optionally, file encoding to use, and any kwargs
"""initialize with path, and optionally, file encoding to use, and any kwargs
to pass to the BeautifulSoup object.
Args:

View File

@@ -19,7 +19,7 @@ class MHTMLLoader(BaseLoader):
bs_kwargs: Union[dict, None] = None,
get_text_separator: str = "",
) -> None:
"""Initialise with path, and optionally, file encoding to use, and any kwargs
"""initialize with path, and optionally, file encoding to use, and any kwargs
to pass to the BeautifulSoup object.
Args:

View File

@@ -66,7 +66,7 @@ class RSpaceLoader(BaseLoader):
except Exception:
raise Exception(
f"Unable to initialise client - is url {self.url} or "
f"Unable to initialize client - is url {self.url} or "
f"api key correct?"
)

View File

@@ -34,7 +34,7 @@ class TencentCOSFileLoader(BaseLoader):
"Please install it with `pip install cos-python-sdk-v5`."
)
# Initialise a client
# initialize a client
client = CosS3Client(self.conf)
with tempfile.TemporaryDirectory() as temp_dir:
file_path = f"{temp_dir}/{self.bucket}/{self.key}"

View File

@@ -30,11 +30,11 @@ class EmbaasEmbeddings(BaseModel, Embeddings):
Example:
.. code-block:: python
# Initialise with default model and instruction
# initialize with default model and instruction
from langchain_community.embeddings import EmbaasEmbeddings
emb = EmbaasEmbeddings()
# Initialise with custom model and instruction
# initialize with custom model and instruction
from langchain_community.embeddings import EmbaasEmbeddings
emb_model = "instructor-large"
emb_inst = "Represent the Wikipedia document for retrieval"

View File

@@ -36,7 +36,7 @@ class SemaDB(VectorStore):
distance_strategy: DistanceStrategy = DistanceStrategy.EUCLIDEAN_DISTANCE,
api_key: str = "",
):
"""Initialise the SemaDB vector store."""
"""initialize the SemaDB vector store."""
self.collection_name = collection_name
self.vector_size = vector_size
self.api_key = api_key or get_from_env("api_key", "SEMADB_API_KEY")