-
-
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:Update openapi.yaml with structured message methods and new examples #58
Conversation
WalkthroughThe pull request introduces updates to the Changes
Poem
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: 0
Outside diff range and nitpick comments (1)
src/libs/Cohere/openapi.yaml (1)
3866-4865
: Consider truncating the response example for brevity.While providing a detailed response example is valuable, the current array of floating-point numbers is quite extensive. Consider truncating this array to show only the first few and last few elements, using an ellipsis to indicate omitted values. This would maintain the illustrative purpose while improving readability and reducing the overall file size.
For example:
embeddings: - [0.016296387, -0.008354187, -0.04699707, ..., 0.015838623, -0.008674622, 0.0002270937]Tools
yamllint
[error] 4835-4835: trailing spaces
(trailing-spaces)
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- src/libs/Cohere/openapi.yaml (5 hunks)
Additional context used
yamllint
src/libs/Cohere/openapi.yaml
[error] 3810-3810: trailing spaces
(trailing-spaces)
[error] 4835-4835: trailing spaces
(trailing-spaces)
Additional comments not posted (4)
src/libs/Cohere/openapi.yaml (4)
3778-3865
: Great addition of comprehensive code samples for theembed
endpoint!The inclusion of examples for TypeScript, Python (both sync and async), Java, and cURL provides excellent guidance for developers across different programming languages. The code samples are well-structured and clearly demonstrate how to use the
embed
endpoint. This addition will significantly improve the developer experience and ease of integration.Tools
yamllint
[error] 3810-3810: trailing spaces
(trailing-spaces)
4866-5865
: Metadata inclusion enhances the response example.The addition of metadata, including the API version and billed units, provides valuable information for developers. This helps in understanding the billing model and keeping track of the API version being used.
6508-6525
: Excellent addition of code samples for thererank
endpoint.The inclusion of examples for TypeScript, Python (both sync and async), Java, and cURL maintains consistency with the
embed
endpoint examples. These well-structured code samples provide clear guidance on how to use thererank
endpoint across different programming languages, which will greatly benefit developers integrating this functionality.
6526-6550
: Clear and informative request and response examples for thererank
endpoint.The request example effectively demonstrates the expected input format, including multiple documents, the query, and other necessary parameters. The response example provides a clear illustration of the output, with relevance scores for the ranked documents. The inclusion of metadata in the response maintains consistency with the
embed
endpoint example. These examples will be very helpful for developers in understanding how to use and interpret the results of thererank
endpoint.
Summary by CodeRabbit
New Features
embed
andrerank
endpoints.Improvements