-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat:No changes made in the pull request. #121
Conversation
Warning Walkthrough skippedFile diffs could not be summarized. Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (1)
src/libs/Cohere/openapi.yaml (1)
8554-8554
: Fix typo in example textThere's a typo in the example document text where "beforethe" should be "before the".
-'Capital punishment has existed in the United States since beforethe United States was a country...' +'Capital punishment has existed in the United States since before the United States was a country...'Also applies to: 8715-8715
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
src/libs/Cohere/openapi.yaml
(2 hunks)
🔥 Files not summarized due to errors (1)
- src/libs/Cohere/openapi.yaml: Error: Server error: no LLM provider could handle the message
🔇 Additional comments (1)
src/libs/Cohere/openapi.yaml (1)
8535-8547
: Well-structured code examples across multiple languages
The code examples are well-implemented with:
- Proper SDK initialization
- Consistent parameters across languages
- Appropriate error handling
- Clear demonstration of the rerank functionality
- sdk: python | ||
name: Async | ||
code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\ndocs = [\n \"Carson City is the capital city of the American state of Nevada.\",\n \"The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.\",\n \"Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.\",\n \"Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.\",\n \"Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states.\",\n]\n\n\nasync def main():\n response = await co.rerank(\n model=\"rerank-english-v2.0\",\n query=\"What is the capital of the United States?\",\n documents=docs,\n top_n=3,\n )\n print(response)\n\n\nasyncio.run(main())\n" | ||
code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\ndocs = [\n \"Carson City is the capital city of the American state of Nevada.\",\n \"The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.\",\n \"Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.\",\n \"Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.\",\n \"Capital punishment has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states.\",\n]\n\n\nasync def main():\n response = await co.rerank(\n model=\"rerank-english-v2.0\",\n query=\"What is the capital of the United States?\",\n documents=docs,\n top_n=3,\n )\n print(response)\n\n\nasyncio.run(main())\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update model version in Python async example
The async example uses rerank-english-v2.0
while all other examples use v3.0
. This inconsistency should be fixed for documentation clarity.
- model="rerank-english-v2.0",
+ model="rerank-english-v3.0",
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\ndocs = [\n \"Carson City is the capital city of the American state of Nevada.\",\n \"The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.\",\n \"Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.\",\n \"Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.\",\n \"Capital punishment has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states.\",\n]\n\n\nasync def main():\n response = await co.rerank(\n model=\"rerank-english-v2.0\",\n query=\"What is the capital of the United States?\",\n documents=docs,\n top_n=3,\n )\n print(response)\n\n\nasyncio.run(main())\n" | |
code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\ndocs = [\n \"Carson City is the capital city of the American state of Nevada.\",\n \"The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.\",\n \"Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.\",\n \"Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.\",\n \"Capital punishment has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states.\",\n]\n\n\nasync def main():\n response = await co.rerank(\n model=\"rerank-english-v3.0\",\n query=\"What is the capital of the United States?\",\n documents=docs,\n top_n=3,\n )\n print(response)\n\n\nasyncio.run(main())\n" |
No description provided.