Skip to content

feat: Enhance API and fix deserialization issues#22

Merged
chyroc merged 11 commits intocoze-dev:mainfrom
hanzeINGH:feat_impl_new_interface
Jan 10, 2025
Merged

feat: Enhance API and fix deserialization issues#22
chyroc merged 11 commits intocoze-dev:mainfrom
hanzeINGH:feat_impl_new_interface

Conversation

@hanzeINGH
Copy link
Copy Markdown
Contributor

@hanzeINGH hanzeINGH commented Jan 3, 2025

  1. Encapsulated new open api for templates, datasets and workflows.
  2. Fixed the bug of deserializing enumeration values.
  3. Replaced the deserialized enumeration values with constants.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 3, 2025

Important

Review skipped

More than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review.

57 files out of 139 files are above the max files limit of 75. Please upgrade to Pro plan to get higher limits.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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. (Beta)
  • @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.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 3, 2025

Codecov Report

Attention: Patch coverage is 84.61538% with 18 lines in your changes missing coverage. Please review.

Project coverage is 78.14%. Comparing base (6c4cdb5) to head (019626f).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...penapi/service/service/dataset/DatasetService.java 82.60% 4 Missing and 4 partials ⚠️
...oze/openapi/service/service/common/ChatStream.java 0.00% 3 Missing ⚠️
...coze/openapi/service/service/chat/ChatService.java 0.00% 2 Missing ⚠️
...java/com/coze/openapi/service/service/CozeAPI.java 90.90% 1 Missing ⚠️
.../openapi/service/service/dataset/ImageService.java 97.29% 0 Missing and 1 partial ⚠️
...napi/service/service/template/TemplateService.java 75.00% 1 Missing ⚠️
.../service/service/workflow/WorkflowChatService.java 75.00% 1 Missing ⚠️
...napi/service/service/workflow/WorkflowService.java 66.66% 1 Missing ⚠️
@@             Coverage Diff              @@
##               main      #22      +/-   ##
============================================
+ Coverage     77.29%   78.14%   +0.84%     
- Complexity      190      203      +13     
============================================
  Files            37       41       +4     
  Lines          1022     1121      +99     
  Branches         80       83       +3     
============================================
+ Hits            790      876      +86     
- Misses          179      187       +8     
- Partials         53       58       +5     
Flag Coverage Δ Complexity Δ
unittests 78.14% <84.61%> (+0.84%) 203.00 <20.00> (+13.00)

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

Files with missing lines Coverage Δ Complexity Δ
.../main/java/com/coze/openapi/service/auth/Auth.java 0.00% <ø> (ø) 0.00 <0.00> (ø)
...m/coze/openapi/service/auth/DeviceOAuthClient.java 73.80% <100.00%> (ø) 8.00 <0.00> (ø)
...n/java/com/coze/openapi/service/auth/JWTOAuth.java 0.00% <ø> (ø) 0.00 <0.00> (ø)
.../com/coze/openapi/service/auth/JWTOAuthClient.java 83.63% <100.00%> (ø) 10.00 <0.00> (ø)
...ava/com/coze/openapi/service/auth/OAuthClient.java 65.46% <100.00%> (ø) 22.00 <2.00> (ø)
...com/coze/openapi/service/auth/PKCEOAuthClient.java 93.87% <100.00%> (ø) 10.00 <0.00> (ø)
.../java/com/coze/openapi/service/auth/TokenAuth.java 0.00% <ø> (ø) 0.00 <0.00> (ø)
.../com/coze/openapi/service/auth/WebOAuthClient.java 100.00% <100.00%> (ø) 5.00 <1.00> (ø)
...n/java/com/coze/openapi/service/config/Consts.java 0.00% <ø> (ø) 0.00 <0.00> (ø)
...penapi/service/service/APIResponseCallAdapter.java 68.18% <ø> (ø) 4.00 <0.00> (ø)
... and 13 more

@chyroc chyroc added the feature label Jan 3, 2025
Change-Id: I060512078576f31548771c9524f8167744a20254
Change-Id: I4f982004382ff0eca5697f26444712144d5f9e2b
Change-Id: Ifc1a210317ec1861b532c4f8fe8df4b68c9402bc
Change-Id: Id4d68193e95f11a077f8f8b7529ce8bf5c2fa97c
Change-Id: I0e5b5f685c95a0d22ecda1525f5b84010f78be5a
Change-Id: Ida07b9855b2e4466418e38ba6e8aa830ff19ba36
Change-Id: I6f936eaca63a543814cc1a83158844ce4dc0111b
Change-Id: Icd657be6a174f745573b3db929ba8b6a57d6b2a1
Change-Id: Ie3fc7d41df2e278d0af9ab9b3c2adbd9facdfa2b
Change-Id: I847f14f4b47a0c0c1b66196954b689dc157070f9
Comment thread api/pom.xml Outdated

<artifactId>coze-api</artifactId>
<version>0.1.6</version>
<version>0.1.7</version>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.2.0

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Collections.singletonList(Message.buildUserQuestionText("who are you")))
.build();

Flowable<ChatEvent> events = coze.workflows().chats().stream(req);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chat

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

}

public static final String VERSION = "0.1.6";
public static final String VERSION = "0.1.7";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.2.0

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Change-Id: I783960a01d2024e223e470ccb2b4e4f2ee833060
@chyroc chyroc changed the title Feat impl new interface feat: Enhance API and fix deserialization issues Jan 10, 2025
@chyroc chyroc merged commit e25a777 into coze-dev:main Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants