Skip to content
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(ai): response stream chunking de-buffering #14079

Merged
merged 11 commits into from
Jan 9, 2025

Conversation

oowl
Copy link
Member

@oowl oowl commented Jan 3, 2025

Summary

Fixes an issue where "AI streaming responses" were returning all inside a single chunk, instead of being returned chunk-by-chunk to the client.

Also fixes other parsing issues with Bedrock, where the wrong response content-type was used.

Checklist

  • The Pull Request has tests
  • A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
  • There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - bugfix, no new docs

Issue reference

FTI-6419

Copy link
Contributor

@tysoekong tysoekong left a comment

Choose a reason for hiding this comment

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

Yep approved as discussed, I've tested all dependent AI services manually and the automation will handle the edge cases.

@tysoekong tysoekong requested a review from fffonion January 3, 2025 17:26
kong/llm/plugin/base.lua Outdated Show resolved Hide resolved
@fffonion fffonion merged commit b7f5ed2 into master Jan 9, 2025
25 checks passed
@fffonion fffonion deleted the fix/ai_streaming_chunking branch January 9, 2025 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants