mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-18 08:03:36 +00:00
docs: Spell check fixes (#24217)
**Description:** Spell check fixes for docs, comments, and a couple of strings. No code change e.g. variable names. **Issue:** none **Dependencies:** none **Twitter handle:** hmartin
This commit is contained in:
@@ -60,7 +60,7 @@ class HuggingFaceCrossEncoder(BaseModel, BaseCrossEncoder):
|
||||
List of scores, one for each pair.
|
||||
"""
|
||||
scores = self.client.predict(text_pairs)
|
||||
# Somes models e.g bert-multilingual-passage-reranking-msmarco
|
||||
# Some models e.g bert-multilingual-passage-reranking-msmarco
|
||||
# gives two score not_relevant and relevant as compare with the query.
|
||||
if len(scores.shape) > 1: # we are going to get the relevant scores
|
||||
scores = map(lambda x: x[1], scores)
|
||||
|
@@ -60,7 +60,7 @@ class AscendEmbeddings(Embeddings, BaseModel):
|
||||
raise ValueError("model_path is required")
|
||||
if not os.access(values["model_path"], os.F_OK):
|
||||
raise FileNotFoundError(
|
||||
f"Unabled to find valid model path in [{values['model_path']}]"
|
||||
f"Unable to find valid model path in [{values['model_path']}]"
|
||||
)
|
||||
try:
|
||||
import torch_npu
|
||||
|
@@ -72,7 +72,7 @@ class SQLStore(BaseStore[str, bytes]):
|
||||
from langchain_rag.storage import SQLStore
|
||||
|
||||
# Instantiate the SQLStore with the root path
|
||||
sql_store = SQLStore(namespace="test", db_url="sqllite://:memory:")
|
||||
sql_store = SQLStore(namespace="test", db_url="sqlite://:memory:")
|
||||
|
||||
# Set values for keys
|
||||
sql_store.mset([("key1", b"value1"), ("key2", b"value2")])
|
||||
|
@@ -9,7 +9,7 @@ from langchain_community.tools.zenguard.tool import Detector, ZenGuardTool
|
||||
@pytest.fixture()
|
||||
def zenguard_tool() -> ZenGuardTool:
|
||||
if os.getenv("ZENGUARD_API_KEY") is None:
|
||||
raise ValueError("ZENGUARD_API_KEY is not set in environment varibale")
|
||||
raise ValueError("ZENGUARD_API_KEY is not set in environment variable")
|
||||
return ZenGuardTool()
|
||||
|
||||
|
||||
|
@@ -12,7 +12,7 @@ PAGE_1 = """
|
||||
Hello.
|
||||
<a href="relative">Relative</a>
|
||||
<a href="/relative-base">Relative base.</a>
|
||||
<a href="http://cnn.com">Aboslute</a>
|
||||
<a href="http://cnn.com">Absolute</a>
|
||||
<a href="//same.foo">Test</a>
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user