-
-
Notifications
You must be signed in to change notification settings - Fork 2k
fix : Ensure stream: false is serialized in requests #1394
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe Changes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
理论是这样,但既然bool为空代表是false了,那显示false应该也没错才对。其次按上面的测试 testChannel ,代码本身的意图是想非流式请求的吧,因为响应处理都是按非流式请求来处理的,既然是非流式请求测试,那更应该把stream显示设置为false而非不设置吧,因为按现在这样 Stream bool |
|
渠道类型为OPENAI的情况下,我在点击模型测试,测试渠道模型的时候,如下图

报了反序列化的错,debug发现代码在构造openai请求参数并序列化请求为json的时候,由于GeneralOpenAIRequest的Stream为false,反序列化后会丢失该字段,部分渠道stream为空的时候默认会按流式返回,导致对于返回结果反序列化解析失败
因此最好取消Stream的json tag omitempty内容,对于stream=false的也应序列化到json
Summary by CodeRabbit