File tree Expand file tree Collapse file tree 11 files changed +308
-0
lines changed
version-2.18/integrations-api
version-2.19/integrations-api
version-2.20/integrations-api
version-2.21/integrations-api
version-2.22/integrations-api
version-2.23/integrations-api
version-2.24/integrations-api
version-2.25/integrations-api
version-2.26/integrations-api
version-2.27/integrations-api
reference/integrations-api Expand file tree Collapse file tree 11 files changed +308
-0
lines changed Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff 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.
You can’t perform that action at this time.
0 commit comments