mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-18 18:53:10 +00:00
multiple: fix codespell (v0.1) (#22785)
This commit is contained in:
parent
3a5523bf82
commit
cd17444711
@ -205,7 +205,7 @@ For chat models is very useful to define prompt as a set of message templates...
|
||||
def simulate_conversation(human_input:str, agent_role:str="a pirate"):
|
||||
"""
|
||||
## System message
|
||||
- note the `:system` sufix inside the <prompt:_role_> tag
|
||||
- note the `:system` suffix inside the <prompt:_role_> tag
|
||||
|
||||
|
||||
```<prompt:system>
|
||||
|
@ -32,7 +32,7 @@ class GoogleDocumentAIWarehouseRetriever(BaseRetriever):
|
||||
|
||||
Documents should be created and documents should be uploaded
|
||||
in a separate flow, and this retriever uses only Document AI
|
||||
schema_id provided to search for revelant documents.
|
||||
schema_id provided to search for relevant documents.
|
||||
|
||||
More info: https://cloud.google.com/document-ai-warehouse.
|
||||
"""
|
||||
|
@ -543,7 +543,7 @@ class Unparser:
|
||||
"Is": "is",
|
||||
"IsNot": "is not",
|
||||
"In": "in",
|
||||
"NotIn": "not in",
|
||||
"NotIn": "not in", # codespell:ignore
|
||||
}
|
||||
|
||||
def _Compare(self, t):
|
||||
|
@ -62,7 +62,7 @@ class Milvus(VectorStore):
|
||||
primary_field (str): Name of the primary key field. Defaults to "pk".
|
||||
text_field (str): Name of the text field. Defaults to "text".
|
||||
vector_field (str): Name of the vector field. Defaults to "vector".
|
||||
metadata_field (str): Name of the metadta field. Defaults to None.
|
||||
metadata_field (str): Name of the metadata field. Defaults to None.
|
||||
When metadata_field is specified,
|
||||
the document's metadata will store as json.
|
||||
|
||||
|
@ -330,7 +330,7 @@ class TestAGEGraph(unittest.TestCase):
|
||||
graph.refresh_schema()
|
||||
|
||||
# check that schema is refreshed
|
||||
self.assertIn(
|
||||
self.assertIn( # codespell:ignore
|
||||
re.sub(r"\s", "", graph.get_schema),
|
||||
[re.sub(r"\s", "", x) for x in expected_possibilities],
|
||||
)
|
||||
|
@ -21,7 +21,7 @@ class BaseFakeCallbackHandler(BaseModel):
|
||||
ignore_retriever_: bool = False
|
||||
ignore_chat_model_: bool = False
|
||||
|
||||
# to allow for similar callback handlers that are not technicall equal
|
||||
# to allow for similar callback handlers that are not technically equal
|
||||
fake_id: Union[str, None] = None
|
||||
|
||||
# add finer-grained counters for easier debugging of failing tests
|
||||
|
@ -1,4 +1,5 @@
|
||||
"""A fake callback handler for testing purposes."""
|
||||
|
||||
from itertools import chain
|
||||
from typing import Any, Dict, List, Optional, Union
|
||||
from uuid import UUID
|
||||
@ -22,7 +23,7 @@ class BaseFakeCallbackHandler(BaseModel):
|
||||
ignore_retriever_: bool = False
|
||||
ignore_chat_model_: bool = False
|
||||
|
||||
# to allow for similar callback handlers that are not technicall equal
|
||||
# to allow for similar callback handlers that are not technically equal
|
||||
fake_id: Union[str, None] = None
|
||||
|
||||
# add finer-grained counters for easier debugging of failing tests
|
||||
|
@ -1,6 +1,6 @@
|
||||
"""Prompts for scoring the outputs of a models for a given question.
|
||||
|
||||
This prompt is used to socre the responses and evaluate how it follows the instructions
|
||||
This prompt is used to score the responses and evaluate how it follows the instructions
|
||||
and answers the question. The prompt is based on the paper from
|
||||
Zheng, et. al. https://arxiv.org/abs/2306.05685
|
||||
"""
|
||||
|
@ -1,4 +1,5 @@
|
||||
"""A fake callback handler for testing purposes."""
|
||||
|
||||
from itertools import chain
|
||||
from typing import Any, Dict, List, Optional, Union
|
||||
from uuid import UUID
|
||||
@ -21,7 +22,7 @@ class BaseFakeCallbackHandler(BaseModel):
|
||||
ignore_retriever_: bool = False
|
||||
ignore_chat_model_: bool = False
|
||||
|
||||
# to allow for similar callback handlers that are not technicall equal
|
||||
# to allow for similar callback handlers that are not technically equal
|
||||
fake_id: Union[str, None] = None
|
||||
|
||||
# add finer-grained counters for easier debugging of failing tests
|
||||
|
@ -19,7 +19,7 @@ class BaseFakeCallbackHandler(BaseModel):
|
||||
ignore_retriever_: bool = False
|
||||
ignore_chat_model_: bool = False
|
||||
|
||||
# to allow for similar callback handlers that are not technicall equal
|
||||
# to allow for similar callback handlers that are not technically equal
|
||||
fake_id: Union[str, None] = None
|
||||
|
||||
# add finer-grained counters for easier debugging of failing tests
|
||||
|
@ -1,4 +1,5 @@
|
||||
"""A fake callback handler for testing purposes."""
|
||||
|
||||
from itertools import chain
|
||||
from typing import Any, Dict, List, Optional, Union
|
||||
from uuid import UUID
|
||||
@ -22,7 +23,7 @@ class BaseFakeCallbackHandler(BaseModel):
|
||||
ignore_retriever_: bool = False
|
||||
ignore_chat_model_: bool = False
|
||||
|
||||
# to allow for similar callback handlers that are not technicall equal
|
||||
# to allow for similar callback handlers that are not technically equal
|
||||
fake_id: Union[str, None] = None
|
||||
|
||||
# add finer-grained counters for easier debugging of failing tests
|
||||
|
@ -58,30 +58,29 @@ ipykernel = "^6.29.2"
|
||||
[tool.poetry.group.typing.dependencies]
|
||||
|
||||
[tool.codespell]
|
||||
skip = '.git,*.pdf,*.svg,*.pdf,*.yaml,*.ipynb,poetry.lock,*.min.js,*.css,package-lock.json,example_data,_dist,examples,templates,*.trig'
|
||||
skip = '.git,*.pdf,*.svg,*.pdf,*.yaml,*.ipynb,poetry.lock,*.min.js,*.css,package-lock.json,example_data,_dist,examples,templates,*.trig,trulens.mdx'
|
||||
# Ignore latin etc
|
||||
ignore-regex = '.*(Stati Uniti|Tense=Pres).*'
|
||||
# whats is a typo but used frequently in queries so kept as is
|
||||
# aapply - async apply
|
||||
# unsecure - typo but part of API, decided to not bother for now
|
||||
ignore-words-list = 'momento,collison,ned,foor,reworkd,parth,whats,aapply,mysogyny,unsecure,damon,crate,aadd,symbl,precesses,accademia,nin'
|
||||
ignore-words-list = 'momento,collison,ned,foor,reworkd,parth,whats,aapply,mysogyny,unsecure,damon,crate,aadd,symbl,precesses,accademia,nin,checkin'
|
||||
|
||||
[tool.ruff]
|
||||
extend-include = ["*.ipynb"]
|
||||
extend-exclude = [
|
||||
"docs/docs/expression_language/why.ipynb" # TODO: look into why linter errors
|
||||
"docs/docs/expression_language/why.ipynb", # TODO: look into why linter errors
|
||||
]
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"**/{cookbook,docs}/*" = [
|
||||
"E402", # allow imports to appear anywhere in docs
|
||||
"F401", # allow "imported but unused" example code
|
||||
"F811", # allow re-importing the same module, so that cells can stay independent
|
||||
"F841", # allow assignments to variables that are never read -- it's example code
|
||||
"E402", # allow imports to appear anywhere in docs
|
||||
"F401", # allow "imported but unused" example code
|
||||
"F811", # allow re-importing the same module, so that cells can stay independent
|
||||
"F841", # allow assignments to variables that are never read -- it's example code
|
||||
]
|
||||
|
||||
# These files were failing the listed rules at the time ruff was adopted for notebooks.
|
||||
# Don't require them to change at once, though we should look into them eventually.
|
||||
"cookbook/gymnasium_agent_simulation.ipynb" = ["F821"]
|
||||
"docs/docs/integrations/document_loaders/tensorflow_datasets.ipynb" = ["F821"]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user