-
Notifications
You must be signed in to change notification settings - Fork 40
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
fix: Fixed the issue that the access_token expired and could not be refreshed #18
Conversation
WalkthroughThe recent updates enhance the AI chat functionality by introducing an 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 as PR comments)
Additionally, you can add 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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- app/controller/app-center/aiChat.ts (1 hunks)
- app/service/app-center/aiChat.ts (2 hunks)
- config/config.default.ts (2 hunks)
Additional comments not posted (7)
app/controller/app-center/aiChat.ts (2)
25-25
: Approved: AddedaccessToken
to request body.The addition of the
accessToken
parameter in the request body is correct and ensures proper authentication.
31-31
: Approved: PassingaccessToken
to service layer.The
accessToken
is correctly passed to thegetAnswerFromAi
method, ensuring it is utilized in the service layer.app/service/app-center/aiChat.ts (3)
33-33
: Approved: AddedaccessToken
parameter.The addition of the
accessToken
parameter in thegetAnswerFromAi
method is correct and ensures proper authentication.
48-48
: Approved: AddedaccessToken
parameter.The addition of the
accessToken
parameter in therequestAnswerFromAi
method is correct and ensures proper authentication.
54-54
: Approved: UsingaccessToken
in AI chat configuration.The
accessToken
is correctly used in the AI chat configuration, ensuring proper authentication.config/config.default.ts (2)
250-250
: Approved: AddedaccessToken
parameter.The addition of the
accessToken
parameter in theconfig.aiChat
function is correct and ensures proper authentication.
282-282
: Approved: UsingaccessToken
inERNIE_BOT_TURBO
configuration.The
accessToken
is correctly used in the configuration for theERNIE_BOT_TURBO
model, ensuring proper authentication.
@Lu17301156525 这个PR需要维护者审批才能合并过去 |
@Lu17301156525 This PR requires the maintainer’s approval before it can be merged. |
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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- app/controller/app-center/aiChat.ts (2 hunks)
- app/service/app-center/aiChat.ts (6 hunks)
- config/config.default.ts (3 hunks)
Additional comments not posted (4)
app/controller/app-center/aiChat.ts (1)
31-32
: Ensure proper handling of thetoken
parameter.The
token
parameter is correctly extracted fromfoundationModel
and passed to thegetAnswerFromAi
service call. Ensure that thetoken
is always available and properly validated before use.app/service/app-center/aiChat.ts (2)
43-43
: Ensure proper handling of thetoken
parameter.The
token
parameter is correctly passed to therequestAnswerFromAi
method. Ensure that thetoken
is always available and properly validated before use.
53-53
: Ensure proper handling of thetoken
parameter.The
token
parameter is correctly used to retrieve the AI chat configuration. Ensure that thetoken
is always available and properly validated before use.config/config.default.ts (1)
249-290
: Ensure proper handling of theaccessToken
parameter.The
accessToken
parameter is correctly used to construct the configuration for different AI models. Ensure that theaccessToken
is always available and properly validated before use.
e305ec2
to
023f461
Compare
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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- app/controller/app-center/aiChat.ts (2 hunks)
- app/service/app-center/aiChat.ts (6 hunks)
- config/config.default.ts (3 hunks)
Files skipped from review as they are similar to previous changes (3)
- app/controller/app-center/aiChat.ts
- app/service/app-center/aiChat.ts
- config/config.default.ts
023f461
to
0d31035
Compare
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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- app/controller/app-center/aiChat.ts (2 hunks)
- app/service/app-center/aiChat.ts (6 hunks)
- config/config.default.ts (3 hunks)
Files skipped from review as they are similar to previous changes (3)
- app/controller/app-center/aiChat.ts
- app/service/app-center/aiChat.ts
- config/config.default.ts
@Lu17301156525 麻烦合并下这个PR |
@Lu17301156525 Please merge this PR |
English | 简体中文
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Background and solution
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit
accessToken
, allowing for more personalized and secure interactions.