Skip to content

Commit 0eb9666

Browse files
Sync Core Integrations API reference (cohere) on Docusaurus (#11095)
Co-authored-by: anakin87 <44616784+anakin87@users.noreply.github.com>
1 parent c8d3644 commit 0eb9666

File tree

11 files changed

+308
-0
lines changed

11 files changed

+308
-0
lines changed

docs-website/reference/integrations-api/cohere.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,3 +991,31 @@ Use the Cohere Reranker to re-rank the list of documents based on the query.
991991
**Raises:**
992992

993993
- <code>ValueError</code> – If `top_k` is not > 0.
994+
995+
#### run_async
996+
997+
```python
998+
run_async(
999+
query: str, documents: list[Document], top_k: int | None = None
1000+
) -> dict[str, list[Document]]
1001+
```
1002+
1003+
Asynchronously re-rank the list of documents based on the query.
1004+
1005+
This is the asynchronous version of the `run` method. It has the same parameters and return values
1006+
but can be used with `await` in async code.
1007+
1008+
**Parameters:**
1009+
1010+
- **query** (<code>str</code>) – Query string.
1011+
- **documents** (<code>list\[Document\]</code>) – List of Documents.
1012+
- **top_k** (<code>int | None</code>) – The maximum number of Documents you want the Ranker to return.
1013+
1014+
**Returns:**
1015+
1016+
- <code>dict\[str, list\[Document\]\]</code> – A dictionary with the following keys:
1017+
- `documents`: List of Documents most similar to the given query in descending order of similarity.
1018+
1019+
**Raises:**
1020+
1021+
- <code>ValueError</code> – If `top_k` is not > 0.

docs-website/reference_versioned_docs/version-2.18/integrations-api/cohere.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,3 +991,31 @@ Use the Cohere Reranker to re-rank the list of documents based on the query.
991991
**Raises:**
992992

993993
- <code>ValueError</code> – If `top_k` is not > 0.
994+
995+
#### run_async
996+
997+
```python
998+
run_async(
999+
query: str, documents: list[Document], top_k: int | None = None
1000+
) -> dict[str, list[Document]]
1001+
```
1002+
1003+
Asynchronously re-rank the list of documents based on the query.
1004+
1005+
This is the asynchronous version of the `run` method. It has the same parameters and return values
1006+
but can be used with `await` in async code.
1007+
1008+
**Parameters:**
1009+
1010+
- **query** (<code>str</code>) – Query string.
1011+
- **documents** (<code>list\[Document\]</code>) – List of Documents.
1012+
- **top_k** (<code>int | None</code>) – The maximum number of Documents you want the Ranker to return.
1013+
1014+
**Returns:**
1015+
1016+
- <code>dict\[str, list\[Document\]\]</code> – A dictionary with the following keys:
1017+
- `documents`: List of Documents most similar to the given query in descending order of similarity.
1018+
1019+
**Raises:**
1020+
1021+
- <code>ValueError</code> – If `top_k` is not > 0.

docs-website/reference_versioned_docs/version-2.19/integrations-api/cohere.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,3 +991,31 @@ Use the Cohere Reranker to re-rank the list of documents based on the query.
991991
**Raises:**
992992

993993
- <code>ValueError</code> – If `top_k` is not > 0.
994+
995+
#### run_async
996+
997+
```python
998+
run_async(
999+
query: str, documents: list[Document], top_k: int | None = None
1000+
) -> dict[str, list[Document]]
1001+
```
1002+
1003+
Asynchronously re-rank the list of documents based on the query.
1004+
1005+
This is the asynchronous version of the `run` method. It has the same parameters and return values
1006+
but can be used with `await` in async code.
1007+
1008+
**Parameters:**
1009+
1010+
- **query** (<code>str</code>) – Query string.
1011+
- **documents** (<code>list\[Document\]</code>) – List of Documents.
1012+
- **top_k** (<code>int | None</code>) – The maximum number of Documents you want the Ranker to return.
1013+
1014+
**Returns:**
1015+
1016+
- <code>dict\[str, list\[Document\]\]</code> – A dictionary with the following keys:
1017+
- `documents`: List of Documents most similar to the given query in descending order of similarity.
1018+
1019+
**Raises:**
1020+
1021+
- <code>ValueError</code> – If `top_k` is not > 0.

docs-website/reference_versioned_docs/version-2.20/integrations-api/cohere.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,3 +991,31 @@ Use the Cohere Reranker to re-rank the list of documents based on the query.
991991
**Raises:**
992992

993993
- <code>ValueError</code> – If `top_k` is not > 0.
994+
995+
#### run_async
996+
997+
```python
998+
run_async(
999+
query: str, documents: list[Document], top_k: int | None = None
1000+
) -> dict[str, list[Document]]
1001+
```
1002+
1003+
Asynchronously re-rank the list of documents based on the query.
1004+
1005+
This is the asynchronous version of the `run` method. It has the same parameters and return values
1006+
but can be used with `await` in async code.
1007+
1008+
**Parameters:**
1009+
1010+
- **query** (<code>str</code>) – Query string.
1011+
- **documents** (<code>list\[Document\]</code>) – List of Documents.
1012+
- **top_k** (<code>int | None</code>) – The maximum number of Documents you want the Ranker to return.
1013+
1014+
**Returns:**
1015+
1016+
- <code>dict\[str, list\[Document\]\]</code> – A dictionary with the following keys:
1017+
- `documents`: List of Documents most similar to the given query in descending order of similarity.
1018+
1019+
**Raises:**
1020+
1021+
- <code>ValueError</code> – If `top_k` is not > 0.

docs-website/reference_versioned_docs/version-2.21/integrations-api/cohere.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,3 +991,31 @@ Use the Cohere Reranker to re-rank the list of documents based on the query.
991991
**Raises:**
992992

993993
- <code>ValueError</code> – If `top_k` is not > 0.
994+
995+
#### run_async
996+
997+
```python
998+
run_async(
999+
query: str, documents: list[Document], top_k: int | None = None
1000+
) -> dict[str, list[Document]]
1001+
```
1002+
1003+
Asynchronously re-rank the list of documents based on the query.
1004+
1005+
This is the asynchronous version of the `run` method. It has the same parameters and return values
1006+
but can be used with `await` in async code.
1007+
1008+
**Parameters:**
1009+
1010+
- **query** (<code>str</code>) – Query string.
1011+
- **documents** (<code>list\[Document\]</code>) – List of Documents.
1012+
- **top_k** (<code>int | None</code>) – The maximum number of Documents you want the Ranker to return.
1013+
1014+
**Returns:**
1015+
1016+
- <code>dict\[str, list\[Document\]\]</code> – A dictionary with the following keys:
1017+
- `documents`: List of Documents most similar to the given query in descending order of similarity.
1018+
1019+
**Raises:**
1020+
1021+
- <code>ValueError</code> – If `top_k` is not > 0.

docs-website/reference_versioned_docs/version-2.22/integrations-api/cohere.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,3 +991,31 @@ Use the Cohere Reranker to re-rank the list of documents based on the query.
991991
**Raises:**
992992

993993
- <code>ValueError</code> – If `top_k` is not > 0.
994+
995+
#### run_async
996+
997+
```python
998+
run_async(
999+
query: str, documents: list[Document], top_k: int | None = None
1000+
) -> dict[str, list[Document]]
1001+
```
1002+
1003+
Asynchronously re-rank the list of documents based on the query.
1004+
1005+
This is the asynchronous version of the `run` method. It has the same parameters and return values
1006+
but can be used with `await` in async code.
1007+
1008+
**Parameters:**
1009+
1010+
- **query** (<code>str</code>) – Query string.
1011+
- **documents** (<code>list\[Document\]</code>) – List of Documents.
1012+
- **top_k** (<code>int | None</code>) – The maximum number of Documents you want the Ranker to return.
1013+
1014+
**Returns:**
1015+
1016+
- <code>dict\[str, list\[Document\]\]</code> – A dictionary with the following keys:
1017+
- `documents`: List of Documents most similar to the given query in descending order of similarity.
1018+
1019+
**Raises:**
1020+
1021+
- <code>ValueError</code> – If `top_k` is not > 0.

docs-website/reference_versioned_docs/version-2.23/integrations-api/cohere.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,3 +991,31 @@ Use the Cohere Reranker to re-rank the list of documents based on the query.
991991
**Raises:**
992992

993993
- <code>ValueError</code> – If `top_k` is not > 0.
994+
995+
#### run_async
996+
997+
```python
998+
run_async(
999+
query: str, documents: list[Document], top_k: int | None = None
1000+
) -> dict[str, list[Document]]
1001+
```
1002+
1003+
Asynchronously re-rank the list of documents based on the query.
1004+
1005+
This is the asynchronous version of the `run` method. It has the same parameters and return values
1006+
but can be used with `await` in async code.
1007+
1008+
**Parameters:**
1009+
1010+
- **query** (<code>str</code>) – Query string.
1011+
- **documents** (<code>list\[Document\]</code>) – List of Documents.
1012+
- **top_k** (<code>int | None</code>) – The maximum number of Documents you want the Ranker to return.
1013+
1014+
**Returns:**
1015+
1016+
- <code>dict\[str, list\[Document\]\]</code> – A dictionary with the following keys:
1017+
- `documents`: List of Documents most similar to the given query in descending order of similarity.
1018+
1019+
**Raises:**
1020+
1021+
- <code>ValueError</code> – If `top_k` is not > 0.

docs-website/reference_versioned_docs/version-2.24/integrations-api/cohere.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,3 +991,31 @@ Use the Cohere Reranker to re-rank the list of documents based on the query.
991991
**Raises:**
992992

993993
- <code>ValueError</code> – If `top_k` is not > 0.
994+
995+
#### run_async
996+
997+
```python
998+
run_async(
999+
query: str, documents: list[Document], top_k: int | None = None
1000+
) -> dict[str, list[Document]]
1001+
```
1002+
1003+
Asynchronously re-rank the list of documents based on the query.
1004+
1005+
This is the asynchronous version of the `run` method. It has the same parameters and return values
1006+
but can be used with `await` in async code.
1007+
1008+
**Parameters:**
1009+
1010+
- **query** (<code>str</code>) – Query string.
1011+
- **documents** (<code>list\[Document\]</code>) – List of Documents.
1012+
- **top_k** (<code>int | None</code>) – The maximum number of Documents you want the Ranker to return.
1013+
1014+
**Returns:**
1015+
1016+
- <code>dict\[str, list\[Document\]\]</code> – A dictionary with the following keys:
1017+
- `documents`: List of Documents most similar to the given query in descending order of similarity.
1018+
1019+
**Raises:**
1020+
1021+
- <code>ValueError</code> – If `top_k` is not > 0.

docs-website/reference_versioned_docs/version-2.25/integrations-api/cohere.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,3 +991,31 @@ Use the Cohere Reranker to re-rank the list of documents based on the query.
991991
**Raises:**
992992

993993
- <code>ValueError</code> – If `top_k` is not > 0.
994+
995+
#### run_async
996+
997+
```python
998+
run_async(
999+
query: str, documents: list[Document], top_k: int | None = None
1000+
) -> dict[str, list[Document]]
1001+
```
1002+
1003+
Asynchronously re-rank the list of documents based on the query.
1004+
1005+
This is the asynchronous version of the `run` method. It has the same parameters and return values
1006+
but can be used with `await` in async code.
1007+
1008+
**Parameters:**
1009+
1010+
- **query** (<code>str</code>) – Query string.
1011+
- **documents** (<code>list\[Document\]</code>) – List of Documents.
1012+
- **top_k** (<code>int | None</code>) – The maximum number of Documents you want the Ranker to return.
1013+
1014+
**Returns:**
1015+
1016+
- <code>dict\[str, list\[Document\]\]</code> – A dictionary with the following keys:
1017+
- `documents`: List of Documents most similar to the given query in descending order of similarity.
1018+
1019+
**Raises:**
1020+
1021+
- <code>ValueError</code> – If `top_k` is not > 0.

docs-website/reference_versioned_docs/version-2.26/integrations-api/cohere.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,3 +991,31 @@ Use the Cohere Reranker to re-rank the list of documents based on the query.
991991
**Raises:**
992992

993993
- <code>ValueError</code> – If `top_k` is not > 0.
994+
995+
#### run_async
996+
997+
```python
998+
run_async(
999+
query: str, documents: list[Document], top_k: int | None = None
1000+
) -> dict[str, list[Document]]
1001+
```
1002+
1003+
Asynchronously re-rank the list of documents based on the query.
1004+
1005+
This is the asynchronous version of the `run` method. It has the same parameters and return values
1006+
but can be used with `await` in async code.
1007+
1008+
**Parameters:**
1009+
1010+
- **query** (<code>str</code>) – Query string.
1011+
- **documents** (<code>list\[Document\]</code>) – List of Documents.
1012+
- **top_k** (<code>int | None</code>) – The maximum number of Documents you want the Ranker to return.
1013+
1014+
**Returns:**
1015+
1016+
- <code>dict\[str, list\[Document\]\]</code> – A dictionary with the following keys:
1017+
- `documents`: List of Documents most similar to the given query in descending order of similarity.
1018+
1019+
**Raises:**
1020+
1021+
- <code>ValueError</code> – If `top_k` is not > 0.

0 commit comments

Comments
 (0)