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

feat: fetch stream compatibility enhance #1551

Merged

Conversation

rickythink
Copy link
Contributor

@rickythink rickythink commented Nov 16, 2023

The purpose of this PR is to fix an issue that fetch stream feature would not work because of compatibility.

Steps to reproduce

  • Use the QQ iOS app
  • browser any dify demo app
  • try to send any word and we won't get any reply

The implementation approach is:

Detect browser version, and do not use fetch streams for older browsers

  • For older browsers, use traditional request mode for chatting
  • For newer browsers, continue using fetch streams

Reference

https://developer.chrome.com/articles/fetch-streaming-requests/

Copy link
Member

@crazywoola crazywoola left a comment

Choose a reason for hiding this comment

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

LGTM

@iamjoel iamjoel merged commit 657334a into langgenius:main Nov 20, 2023
1 check passed
charSLee013 added a commit to charSLee013/dify that referenced this pull request Nov 24, 2023
* Update README.md (langgenius#1525)

* fix: conversation rename always auto generate (langgenius#1530)

* new readme (langgenius#1528)

* doc: update readme (langgenius#1536)

* feat: optimize timezone of server (langgenius#1537)

* Doc/update readme patch 1 (langgenius#1538)

* feat: add code of conduct (langgenius#1541)

* fix: upload image (langgenius#1522)

* feat: remove plugin page (langgenius#1544)

* update images (langgenius#1548)

* update images (langgenius#1549)

* fix: upload file not clickable in firefox (langgenius#1552)

* feat: supports for new version of openllm (langgenius#1554)

* Add some interesting badges :) (langgenius#1558)

* Feat/add retriever rerank (langgenius#1560)

Co-authored-by: jyong <[email protected]>

* Feat/jp and es (langgenius#1562)

* Update README_CN.md

* feat: add retriever rank fe (langgenius#1557)

Co-authored-by: StyleZhang <[email protected]>

* fix hybrid search reranking check (langgenius#1563)

Co-authored-by: jyong <[email protected]>

* fix the error message (langgenius#1564)

Co-authored-by: jyong <[email protected]>

* chore: retrieval docs links and enchance help doc translation (langgenius#1570)

* feat: fetch stream compatibility enhance (langgenius#1551)

* fix(web): Sidebar create new chat context (langgenius#1569)

* Feat/sdk vision support (langgenius#1531)

Co-authored-by: Joel <[email protected]>

* fix(api): patch Windows timezone set (langgenius#1575)

* feat: configurable invite expiry time (langgenius#1573)

* fix:  some RAG retrieval bugs (langgenius#1577)

Co-authored-by: Joel <[email protected]>

* fix: some text (langgenius#1579)

* fix multi retrieval with resource score issue (langgenius#1578)

Co-authored-by: jyong <[email protected]>

* feat: add `supported_model_types` field and filter in provider list (langgenius#1581)

* Compatible model saving error (langgenius#1582)

Co-authored-by: jyong <[email protected]>

* feat: bump version to 0.3.31 (langgenius#1584)

* fix: retrieval test page hide rerank model also hide  retrieval config (langgenius#1585)

* fix: chat on start bug (langgenius#1588)

* Update docker-compose.yaml (langgenius#1587)

* feat: bump version to 0.3.31-fix1 (langgenius#1589)

* fix: safari can not in (langgenius#1590)

* feat: add anthropic claude-2.1 support (langgenius#1591)

* feat: bump version to 0.3.31-fix2 (langgenius#1592)

* fix sql transaction error in statistic API (langgenius#1586)

* fix: chat token spent info style (langgenius#1597)

* fix weaviate hybrid search issue (langgenius#1600)

Co-authored-by: jyong <[email protected]>

* feat: optimize db connections in thread (langgenius#1601)

* fix hybrid search when document is none (langgenius#1603)

Co-authored-by: jyong <[email protected]>

* Fix/multi thread parameter (langgenius#1604)

* feat: bump version to 0.3.31-fix3 (langgenius#1606)

---------

Co-authored-by: Luyu Zhang <[email protected]>
Co-authored-by: takatost <[email protected]>
Co-authored-by: crazywoola <[email protected]>
Co-authored-by: zxhlyh <[email protected]>
Co-authored-by: Jyong <[email protected]>
Co-authored-by: jyong <[email protected]>
Co-authored-by: Joel <[email protected]>
Co-authored-by: Ricky <[email protected]>
Co-authored-by: Rhon Joe <[email protected]>
Co-authored-by: Garfield Dai <[email protected]>
Co-authored-by: Matri <[email protected]>
Co-authored-by: waltcow <[email protected]>
charSLee013 added a commit to charSLee013/dify that referenced this pull request Nov 24, 2023
* Update README.md (langgenius#1525)

* fix: conversation rename always auto generate (langgenius#1530)

* new readme (langgenius#1528)

* doc: update readme (langgenius#1536)

* feat: optimize timezone of server (langgenius#1537)

* Doc/update readme patch 1 (langgenius#1538)

* feat: add code of conduct (langgenius#1541)

* fix: upload image (langgenius#1522)

* feat: remove plugin page (langgenius#1544)

* update images (langgenius#1548)

* update images (langgenius#1549)

* fix: upload file not clickable in firefox (langgenius#1552)

* feat: supports for new version of openllm (langgenius#1554)

* Add some interesting badges :) (langgenius#1558)

* Feat/add retriever rerank (langgenius#1560)



* Feat/jp and es (langgenius#1562)

* Update README_CN.md

* feat: add retriever rank fe (langgenius#1557)



* fix hybrid search reranking check (langgenius#1563)



* fix the error message (langgenius#1564)



* chore: retrieval docs links and enchance help doc translation (langgenius#1570)

* feat: fetch stream compatibility enhance (langgenius#1551)

* fix(web): Sidebar create new chat context (langgenius#1569)

* Feat/sdk vision support (langgenius#1531)



* fix(api): patch Windows timezone set (langgenius#1575)

* feat: configurable invite expiry time (langgenius#1573)

* fix:  some RAG retrieval bugs (langgenius#1577)



* fix: some text (langgenius#1579)

* fix multi retrieval with resource score issue (langgenius#1578)



* feat: add `supported_model_types` field and filter in provider list (langgenius#1581)

* Compatible model saving error (langgenius#1582)



* feat: bump version to 0.3.31 (langgenius#1584)

* fix: retrieval test page hide rerank model also hide  retrieval config (langgenius#1585)

* fix: chat on start bug (langgenius#1588)

* Update docker-compose.yaml (langgenius#1587)

* feat: bump version to 0.3.31-fix1 (langgenius#1589)

* fix: safari can not in (langgenius#1590)

* feat: add anthropic claude-2.1 support (langgenius#1591)

* feat: bump version to 0.3.31-fix2 (langgenius#1592)

* fix sql transaction error in statistic API (langgenius#1586)

* fix: chat token spent info style (langgenius#1597)

* fix weaviate hybrid search issue (langgenius#1600)



* feat: optimize db connections in thread (langgenius#1601)

* fix hybrid search when document is none (langgenius#1603)



* Fix/multi thread parameter (langgenius#1604)

* feat: bump version to 0.3.31-fix3 (langgenius#1606)

---------

Co-authored-by: Luyu Zhang <[email protected]>
Co-authored-by: takatost <[email protected]>
Co-authored-by: crazywoola <[email protected]>
Co-authored-by: zxhlyh <[email protected]>
Co-authored-by: Jyong <[email protected]>
Co-authored-by: jyong <[email protected]>
Co-authored-by: Joel <[email protected]>
Co-authored-by: Ricky <[email protected]>
Co-authored-by: Rhon Joe <[email protected]>
Co-authored-by: Garfield Dai <[email protected]>
Co-authored-by: Matri <[email protected]>
Co-authored-by: waltcow <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants