Skip to content

Commit c3f8733

Browse files
authored
fix: correct spelling mistakes of "seperate, intialise, pre-defined" (langchain-ai#14647)
fix spellings **seperate -> separate**: found more occurrences, see langchain-ai#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?
1 parent 86d27fd commit c3f8733

File tree

14 files changed

+15
-15
lines changed

14 files changed

+15
-15
lines changed

cookbook/Multi_modal_RAG.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"\n",
4747
"---\n",
4848
"\n",
49-
"A seperate cookbook highlights `Option 1` [here](https://github.com/langchain-ai/langchain/blob/master/cookbook/multi_modal_RAG_chroma.ipynb).\n",
49+
"A separate cookbook highlights `Option 1` [here](https://github.com/langchain-ai/langchain/blob/master/cookbook/multi_modal_RAG_chroma.ipynb).\n",
5050
"\n",
5151
"And option `Option 2` is appropriate for cases when a multi-modal LLM cannot be used for answer synthesis (e.g., cost, etc).\n",
5252
"\n",

docs/docs/modules/model_io/prompts/prompt_templates/index.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"id": "2d98412d-fc53-42c1-aed8-f1f8eb9ada58",
1717
"metadata": {},
1818
"source": [
19-
"Prompt templates are pre-defined recipes for generating prompts for language models.\n",
19+
"Prompt templates are predefined recipes for generating prompts for language models.\n",
2020
"\n",
2121
"A template may include instructions, few-shot examples, and specific context and\n",
2222
"questions appropriate for a given task.\n",

libs/community/langchain_community/document_loaders/gcs_file.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def load(self) -> List[Document]:
5858
"Please install it with `pip install google-cloud-storage`."
5959
)
6060

61-
# Initialise a client
61+
# initialize a client
6262
storage_client = storage.Client(
6363
self.project_name, client_info=get_client_info("google-cloud-storage")
6464
)

libs/community/langchain_community/document_loaders/html_bs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def __init__(
1818
bs_kwargs: Union[dict, None] = None,
1919
get_text_separator: str = "",
2020
) -> None:
21-
"""Initialise with path, and optionally, file encoding to use, and any kwargs
21+
"""initialize with path, and optionally, file encoding to use, and any kwargs
2222
to pass to the BeautifulSoup object.
2323
2424
Args:

libs/community/langchain_community/document_loaders/mhtml.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def __init__(
1919
bs_kwargs: Union[dict, None] = None,
2020
get_text_separator: str = "",
2121
) -> None:
22-
"""Initialise with path, and optionally, file encoding to use, and any kwargs
22+
"""initialize with path, and optionally, file encoding to use, and any kwargs
2323
to pass to the BeautifulSoup object.
2424
2525
Args:

libs/community/langchain_community/document_loaders/rspace.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def _create_rspace_client(self) -> Any:
6666

6767
except Exception:
6868
raise Exception(
69-
f"Unable to initialise client - is url {self.url} or "
69+
f"Unable to initialize client - is url {self.url} or "
7070
f"api key correct?"
7171
)
7272

libs/community/langchain_community/document_loaders/tencent_cos_file.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def lazy_load(self) -> Iterator[Document]:
3434
"Please install it with `pip install cos-python-sdk-v5`."
3535
)
3636

37-
# Initialise a client
37+
# initialize a client
3838
client = CosS3Client(self.conf)
3939
with tempfile.TemporaryDirectory() as temp_dir:
4040
file_path = f"{temp_dir}/{self.bucket}/{self.key}"

libs/community/langchain_community/embeddings/embaas.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ class EmbaasEmbeddings(BaseModel, Embeddings):
3030
Example:
3131
.. code-block:: python
3232
33-
# Initialise with default model and instruction
33+
# initialize with default model and instruction
3434
from langchain_community.embeddings import EmbaasEmbeddings
3535
emb = EmbaasEmbeddings()
3636
37-
# Initialise with custom model and instruction
37+
# initialize with custom model and instruction
3838
from langchain_community.embeddings import EmbaasEmbeddings
3939
emb_model = "instructor-large"
4040
emb_inst = "Represent the Wikipedia document for retrieval"

libs/community/langchain_community/vectorstores/semadb.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def __init__(
3636
distance_strategy: DistanceStrategy = DistanceStrategy.EUCLIDEAN_DISTANCE,
3737
api_key: str = "",
3838
):
39-
"""Initialise the SemaDB vector store."""
39+
"""initialize the SemaDB vector store."""
4040
self.collection_name = collection_name
4141
self.vector_size = vector_size
4242
self.api_key = api_key or get_from_env("api_key", "SEMADB_API_KEY")

libs/langchain/langchain/agents/agent_iterator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def __iter__(self: "AgentExecutorIterator") -> Iterator[AddableDict]:
210210

211211
async def __aiter__(self) -> AsyncIterator[AddableDict]:
212212
"""
213-
N.B. __aiter__ must be a normal method, so need to initialise async run manager
213+
N.B. __aiter__ must be a normal method, so need to initialize async run manager
214214
on first __anext__ call where we can await it
215215
"""
216216
logger.debug("Initialising AgentExecutorIterator (async)")

libs/langchain/langchain/chains/api/news_docs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
1111
country | The 2-letter ISO 3166-1 code of the country you want to get headlines for. Possible options: ae ar at au be bg br ca ch cn co cu cz de eg fr gb gr hk hu id ie il in it jp kr lt lv ma mx my ng nl no nz ph pl pt ro rs ru sa se sg si sk th tr tw ua us ve za. Note: you can't mix this param with the sources param.
1212
category | The category you want to get headlines for. Possible options: business entertainment general health science sports technology. Note: you can't mix this param with the sources param.
13-
sources | A comma-seperated string of identifiers for the news sources or blogs you want headlines from. Use the /top-headlines/sources endpoint to locate these programmatically or look at the sources index. Note: you can't mix this param with the country or category params.
13+
sources | A comma-separated string of identifiers for the news sources or blogs you want headlines from. Use the /top-headlines/sources endpoint to locate these programmatically or look at the sources index. Note: you can't mix this param with the country or category params.
1414
q | Keywords or a phrase to search for.
1515
pageSize | int | The number of results to return per page (request). 20 is the default, 100 is the maximum.
1616
page | int | Use this to page through the results if the total results found is greater than the page size.

libs/langchain/langchain/evaluation/criteria/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
1212
Examples
1313
--------
14-
Using a pre-defined criterion:
14+
Using a predefined criterion:
1515
>>> from langchain.llms import OpenAI
1616
>>> from langchain.evaluation.criteria import CriteriaEvalChain
1717

libs/langchain/langchain/output_parsers/format_instructions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050

5151
PANDAS_DATAFRAME_FORMAT_INSTRUCTIONS = """The output should be formatted as a string as the operation, followed by a colon, followed by the column or row to be queried on, followed by optional array parameters.
5252
1. The column names are limited to the possible columns below.
53-
2. Arrays must either be a comma-seperated list of numbers formatted as [1,3,5], or it must be in range of numbers formatted as [0..4].
53+
2. Arrays must either be a comma-separated list of numbers formatted as [1,3,5], or it must be in range of numbers formatted as [0..4].
5454
3. Remember that arrays are optional and not necessarily required.
5555
4. If the column is not in the possible columns or the operation is not a valid Pandas DataFrame operation, return why it is invalid as a sentence starting with either "Invalid column" or "Invalid operation".
5656

libs/langchain/tests/unit_tests/agents/test_agent_iterator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ def test_agent_iterator_failing_tool() -> None:
361361

362362
agent_iter = agent.iter(inputs="when was langchain made")
363363
assert isinstance(agent_iter, AgentExecutorIterator)
364-
# initialise iterator
364+
# initialize iterator
365365
iterator = iter(agent_iter)
366366

367367
with pytest.raises(ZeroDivisionError):

0 commit comments

Comments
 (0)