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

♻️ refactor: change empty content stream behavior #3883

Merged
merged 2 commits into from
Sep 10, 2024

Conversation

hezhijie0327
Copy link
Contributor

@hezhijie0327 hezhijie0327 commented Sep 10, 2024

💻 变更类型 | Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 👷 build
  • ⚡️ perf
  • 📝 docs
  • 🔨 chore

🔀 变更说明 | Description of Change

#3392 中拆分,Stream 流中 content 为空的处理行为

情况如下:
tool_calls 存在,但 content 为空字符串,引起 UI 对话界面显示空,但无报错
image

📝 补充信息 | Additional Information

{"choices":[{"index":0,"message":{"role":"assistant","content":"","tool_calls":[{"id":"3NcHNntdRyaHu8zisKJAhQ","function":{"name":"realtime-weather____fetchCurrentWeather","arguments":"{\"city\": \"Singapore\"}"}}]},"stop_reason":"tool_calls"}]}

Copy link

vercel bot commented Sep 10, 2024

@hezhijie0327 is attempting to deploy a commit to the LobeHub Pro Team on Vercel.

A member of the Team first needs to authorize it.

@lobehubbot
Copy link
Member

👍 @hezhijie0327

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

Copy link

codecov bot commented Sep 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.83%. Comparing base (fdaa190) to head (713ffa4).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##             main    #3883     +/-   ##
=========================================
  Coverage   91.83%   91.83%             
=========================================
  Files         455      455             
  Lines       30445    30452      +7     
  Branches     1963     3105   +1142     
=========================================
+ Hits        27958    27965      +7     
  Misses       2487     2487             
Flag Coverage Δ
app 91.83% <100.00%> (+<0.01%) ⬆️
server 97.36% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hezhijie0327 hezhijie0327 marked this pull request as ready for review September 10, 2024 13:53
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Sep 10, 2024
Copy link

vercel bot commented Sep 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lobe-chat-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 10, 2024 1:58pm

@arvinxx arvinxx merged commit e910f68 into lobehub:main Sep 10, 2024
9 of 10 checks passed
@lobehubbot
Copy link
Member

❤️ Great PR @hezhijie0327 ❤️

The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world.
项目的成长离不开用户反馈和贡献,感谢您的贡献! 如果您对 LobeHub 开发者社区感兴趣,请加入我们的 discord,然后私信 @arvinxx@canisminor1990。他们会邀请您加入我们的私密开发者频道。我们将会讨论关于 Lobe Chat 的开发,分享和讨论全球范围内的 AI 消息。

github-actions bot pushed a commit that referenced this pull request Sep 10, 2024
### [Version&nbsp;1.15.34](v1.15.33...v1.15.34)
<sup>Released on **2024-09-10**</sup>

#### ♻ Code Refactoring

- **misc**: Change empty content stream behavior.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### Code refactoring

* **misc**: Change empty content stream behavior, closes [#3883](#3883) ([e910f68](e910f68))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
@lobehubbot
Copy link
Member

🎉 This PR is included in version 1.15.34 🎉

The release is available on:

Your semantic-release bot 📦🚀

github-actions bot pushed a commit to bentwnghk/lobe-chat that referenced this pull request Sep 10, 2024
### [Version&nbsp;1.58.16](v1.58.15...v1.58.16)
<sup>Released on **2024-09-10**</sup>

#### ♻ Code Refactoring

- **misc**: Change empty content stream behavior.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### Code refactoring

* **misc**: Change empty content stream behavior, closes [lobehub#3883](https://github.com/bentwnghk/lobe-chat/issues/3883) ([e910f68](e910f68))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
@hezhijie0327 hezhijie0327 deleted the stream branch September 10, 2024 14:24
@abix5
Copy link

abix5 commented Sep 13, 2024

I checked on the latest (v1.17.0) version, the bug persists

v1.15.31 works great

image image

@hezhijie0327
Copy link
Contributor Author

@abix5 can create a new issue and share the stream?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants