Skip to content

feat: add reasoning and bump to 0.2.8#51

Closed
hanzeINGH wants to merge 1 commit intocoze-dev:mainfrom
hanzeINGH:feat_add_reasoning
Closed

feat: add reasoning and bump to 0.2.8#51
hanzeINGH wants to merge 1 commit intocoze-dev:mainfrom
hanzeINGH:feat_add_reasoning

Conversation

@hanzeINGH
Copy link
Contributor

Change-Id: Id4b13779ae1df816eff998bdb1dc38b74fae12ac

Change-Id: Id4b13779ae1df816eff998bdb1dc38b74fae12ac
@coderabbitai
Copy link

coderabbitai bot commented Feb 26, 2025

Warning

Rate limit exceeded

@hanzeINGH has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 17 minutes and 47 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between c4cfe78 and bb38847.

📒 Files selected for processing (1)
  • api/src/test/java/com/coze/openapi/service/service/common/AbstractChatEventCallbackTest.java (2 hunks)

Walkthrough

This pull request updates version numbers and adjusts a data model. The API’s Maven files and a service interceptor now reflect version 0.2.8 instead of 0.2.7. Additionally, a new field reasoningContent annotated with @JsonProperty("reasoning_content") is added to the Message class. These changes alter configuration and data representation without affecting existing control flows.

Changes

File(s) Change Summary
api/pom.xml, example/pom.xml Updated the coze-api version/dependency from 0.2.7 to 0.2.8.
api/.../service/utils/UserAgentInterceptor.java Updated the static VERSION string from "0.2.7" to "0.2.8".
api/.../message/model/Message.java Added a new field reasoningContent with @JsonProperty("reasoning_content") for JSON serialization/deserialization.

Possibly related PRs

Suggested labels

feature, chore

Poem

Oh, I’m a rabbit with a skip and a hop,
Version numbers climb; they never stop.
A new field sprouts in the Message tree,
JSON magic now dances with glee.
Hop along the code, fresh and bright—
A carrot byte treats our updates just right!
🥕🐇


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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a 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

🧹 Nitpick comments (1)
api/src/main/java/com/coze/openapi/client/connversations/message/model/Message.java (1)

75-77: Add JavaDoc comment for reasoningContent field.

The new reasoningContent field is missing a JavaDoc comment that describes its purpose and usage, which would be consistent with the documentation pattern used for other fields in this class.

Consider adding a documentation comment similar to other fields:

+  /**
+   * The reasoning content associated with the message.
+   * This field contains the assistant's step-by-step thought process or reasoning behind the response.
+   */
  @JsonProperty("reasoning_content")
  private String reasoningContent;
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 731c4ba and 3dbb1eb.

📒 Files selected for processing (4)
  • api/pom.xml (1 hunks)
  • api/src/main/java/com/coze/openapi/client/connversations/message/model/Message.java (1 hunks)
  • api/src/main/java/com/coze/openapi/service/utils/UserAgentInterceptor.java (1 hunks)
  • example/pom.xml (1 hunks)
✅ Files skipped from review due to trivial changes (3)
  • example/pom.xml
  • api/pom.xml
  • api/src/main/java/com/coze/openapi/service/utils/UserAgentInterceptor.java
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: test (Java 11 on macOS)
  • GitHub Check: test (Java 11 on Windows)
🔇 Additional comments (1)
api/src/main/java/com/coze/openapi/client/connversations/message/model/Message.java (1)

78-124:

Details

❓ Verification inconclusive

Consider updating builder methods for the new field.

The existing helper methods (such as buildAssistantAnswer) do not include the new reasoningContent field. If this field is used when an assistant responds, consider updating these methods or adding new ones that support setting this field.

It would be helpful to understand if the reasoning content needs to be set through the existing builder methods, or if it's only populated when deserializing responses from the API.


🏁 Script executed:

#!/bin/bash
# Search for places where reasoning_content might be used in the codebase
rg -A 2 -B 2 "reasoning_content" --glob "!Message.java"

# Search for any references to reasoning
rg -A 2 -B 2 "reasoning" --glob "!Message.java"

Length of output: 103


Action Required: Verify New Field Handling in Builder Methods

It appears that none of the code outside of Message.java references a reasoningContent field. However, because this new field is not currently exposed through any of the builder helper methods (e.g., in buildAssistantAnswer), please confirm if the intent is to allow setting reasoningContent when constructing a message—or if it should only be populated during deserialization from the API responses. If external setting is required, consider either updating the existing helper methods or adding new ones that support the reasoningContent field.

@codecov
Copy link

codecov bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.23%. Comparing base (731c4ba) to head (bb38847).

@@             Coverage Diff              @@
##               main      #51      +/-   ##
============================================
- Coverage     76.25%   76.23%   -0.02%     
  Complexity      214      214              
============================================
  Files            43       43              
  Lines          1196     1195       -1     
  Branches         84       84              
============================================
- Hits            912      911       -1     
  Misses          223      223              
  Partials         61       61              
Flag Coverage Δ Complexity Δ
unittests 76.23% <ø> (-0.02%) 214.00 <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ Complexity Δ
...ze/openapi/service/utils/UserAgentInterceptor.java 81.25% <ø> (ø) 7.00 <0.00> (ø)

... and 1 file with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant