-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
baidu-qianfan[patch]: Fix streaming mode of Qianfan #6661
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
a224d17
to
c1331a6
Compare
…cific type to fix eslint error
Thanks for this @stanoswald! This seems like a fairly big refactor, and while it all looks reasonable on the surface, I'd love @dl102306's opinion as well since I'm personally unable to test this integration. Will give them a few more days and if they don't respond, will merge. |
Sure, I personally have used this branch in production for a while, but only in the usual way of non-streaming and streaming invocation. I'm not sure if this code was mainly maintained by the QianFan platform. As their client, I'll also try to contact them to see if they can review this PR and try to give it a full test to make sure it works well. |
@jacoblee93 @stanoswald Sorry for later response. This is a big changes. I need do some test to check this changes works fine today. Please wait for a day or two, thanks a lot. |
@jacoblee93 @stanoswald please merge these changes. I have tested these changes. It's work well. thanks~ |
Thanks both of you! |
Thanks for looking into this guys! I'll make some further fixes for CI later. |
@stanoswald this is failing CI:
Can you fix? |
@stanoswald is attempting to deploy a commit to the LangChain Team on Vercel. A member of the Team first needs to authorize it. |
@jacoblee93 I just updated the code, it should be fixed now. |
@jacoblee93 Hello, could you authorize this to let the CI run? |
Thank you! |
Even when
streaming
is set totrue
, the originalcompletionWithRetry
function waits until all chunks are received before triggering the event and returning the result.This PR updates the
completionWithRetry
,_generate
and use_streamResponseChunks
function to handle streaming chunk from BaiduQianFan.The refactor also fixed the original error of
Invalid "runId" provided to "handleLLMNewToken" callback.