Skip to content

Conversation

vislee
Copy link

@vislee vislee commented Apr 17, 2025

Description

The ctx.ai_token_usage may not get the correct value.
The events array after splitting may contain empty strings, which can cause subsequent event to be skipped.

Which issue(s) this PR fixes:

Fixes #

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

…hich can cause subsequent messages to be skipped.
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels Apr 17, 2025
@shreemaan-abhishek
Copy link
Contributor

please add test cases too.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Apr 21, 2025
Copy link
Contributor

@Baoyuantop Baoyuantop left a comment

Choose a reason for hiding this comment

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

Please fix failed lint CI

@Baoyuantop
Copy link
Contributor

Hi @vislee, is there time to continue with this PR?

@Baoyuantop Baoyuantop added the wait for update wait for the author's response in this issue/PR label Apr 29, 2025
@vislee vislee changed the title bugfix: The events array after splitting may contain empty strings, w… fix: The events array after splitting may contain empty strings, w… May 24, 2025
@vislee
Copy link
Author

vislee commented May 24, 2025

I've pushed the fix failed lint CI.
Btw, how to run tests locally, Are there docker images?

Hi @vislee, is there time to continue with this PR?

@Baoyuantop
Copy link
Contributor

@Baoyuantop Baoyuantop removed wait for update wait for the author's response in this issue/PR user responded labels Jun 16, 2025
@Baoyuantop
Copy link
Contributor

Hi @vislee, any updates?

@Baoyuantop Baoyuantop added the wait for update wait for the author's response in this issue/PR label Jul 3, 2025
@Baoyuantop
Copy link
Contributor

I'll convert this PR to draft first, if the changes are done please request review again.

@Baoyuantop Baoyuantop marked this pull request as draft July 28, 2025 07:21
Copy link

This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If you think that's incorrect or this pull request should instead be reviewed, please simply write any comment. Even if closed, you can still revive the PR at any time or discuss it on the [email protected] list. Thank you for your contributions.

@github-actions github-actions bot added the stale label Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working size:L This PR changes 100-499 lines, ignoring generated files. stale wait for update wait for the author's response in this issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants