mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-29 23:38:51 +00:00
codespell: workflow, config + some (quite a few) typos fixed (#6785)
Probably the most boring PR to review ;) Individual commits might be easier to digest --------- Co-authored-by: Bagatur <baskaryan@gmail.com> Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
931e68692e
commit
0d92a7f357
@@ -284,7 +284,7 @@ for s in snippets:
|
||||
semantic_snippets[cur_idx].metadata['content_font'] = max(s[1], semantic_snippets[cur_idx].metadata['content_font'])
|
||||
continue
|
||||
|
||||
# if current snippet's font size > previous section's content but less tha previous section's heading than also make a new
|
||||
# if current snippet's font size > previous section's content but less than previous section's heading than also make a new
|
||||
# section (e.g. title of a pdf will have the highest font size but we don't want it to subsume all sections)
|
||||
metadata={'heading':s[0], 'content_font': 0, 'heading_font': s[1]}
|
||||
metadata.update(data.metadata)
|
||||
|
@@ -44,7 +44,7 @@ retriever = db.as_retriever(search_type="mmr")
|
||||
|
||||
|
||||
```python
|
||||
docs = retriever.get_relevant_documents("what did he say abotu ketanji brown jackson")
|
||||
docs = retriever.get_relevant_documents("what did he say about ketanji brown jackson")
|
||||
```
|
||||
|
||||
## Similarity Score Threshold Retrieval
|
||||
@@ -58,7 +58,7 @@ retriever = db.as_retriever(search_type="similarity_score_threshold", search_kwa
|
||||
|
||||
|
||||
```python
|
||||
docs = retriever.get_relevant_documents("what did he say abotu ketanji brown jackson")
|
||||
docs = retriever.get_relevant_documents("what did he say about ketanji brown jackson")
|
||||
```
|
||||
|
||||
## Specifying top k
|
||||
@@ -71,7 +71,7 @@ retriever = db.as_retriever(search_kwargs={"k": 1})
|
||||
|
||||
|
||||
```python
|
||||
docs = retriever.get_relevant_documents("what did he say abotu ketanji brown jackson")
|
||||
docs = retriever.get_relevant_documents("what did he say about ketanji brown jackson")
|
||||
```
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user