[PR #5575] [MERGED] feat: support switch model #6896

Closed
opened 2026-03-23 23:17:10 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/5575
Author: @Xazin
Created: 6/19/2024
Status: Merged
Merged: 6/24/2024
Merged by: @appflowy

Base: mainHead: feat/ai-settings-page


📝 Commits (10+)

  • 368264b feat: ai settings page
  • f096ca5 chore: intergate client api
  • 1e3e589 chore: intergate client api
  • ff97208 Merge branch 'main' into feat/ai-settings-page
  • 5d7f5b8 chore: replace open ai calls
  • 2a82837 chore: disable gen image from ai
  • 6236fed chore: clippy
  • 59c198d chore: remove learn about ai
  • 53299cb chore: fix wanrings
  • 84ed4d0 chore: fix restart button title

📊 Changes

78 files changed (+1383 additions, -499 deletions)

View changed files

📝 frontend/appflowy_flutter/integration_test/cloud/document_sync_test.dart (+0 -1)
📝 frontend/appflowy_flutter/integration_test/desktop/uncategorized/open_ai_smart_menu_test.dart (+3 -3)
📝 frontend/appflowy_flutter/integration_test/shared/mock/mock_openai_repository.dart (+1 -1)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/image/image_placeholder.dart (+1 -1)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/image/open_ai_image_widget.dart (+3 -3)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/image/upload_image_menu.dart (+20 -21)
frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/openai/service/ai_client.dart (+32 -0)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/openai/service/error.dart (+5 -5)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/openai/service/openai_client.dart (+20 -131)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/openai/widgets/auto_completion_node_widget.dart (+25 -61)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/openai/widgets/loading.dart (+2 -2)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/openai/widgets/smart_edit_node_widget.dart (+37 -66)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/openai/widgets/smart_edit_toolbar_item.dart (+9 -7)
📝 frontend/appflowy_flutter/lib/startup/deps_resolver.dart (+4 -6)
frontend/appflowy_flutter/lib/user/application/ai_service.dart (+122 -0)
📝 frontend/appflowy_flutter/lib/user/application/user_listener.dart (+22 -16)
📝 frontend/appflowy_flutter/lib/workspace/application/home/home_bloc.dart (+2 -2)
📝 frontend/appflowy_flutter/lib/workspace/application/home/home_setting_bloc.dart (+2 -2)
📝 frontend/appflowy_flutter/lib/workspace/application/menu/menu_user_bloc.dart (+2 -2)
frontend/appflowy_flutter/lib/workspace/application/settings/ai/settings_ai_bloc.dart (+127 -0)

...and 58 more files

📄 Description

Here's a clearer version of your message:

  1. Support switching to other models. The local AI model will be completed in another PR.
    image

  2. Replace editor OpenAI calls with AppFlowy AI. For example, support improving writing with Claude-3-Sonnet or OpenAI.

  3. Support enabling AI search (to be used in a future version).

  4. Disable generating images from text. This issue will be fixed in another PR.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AppFlowy-IO/AppFlowy/pull/5575 **Author:** [@Xazin](https://github.com/Xazin) **Created:** 6/19/2024 **Status:** ✅ Merged **Merged:** 6/24/2024 **Merged by:** [@appflowy](https://github.com/appflowy) **Base:** `main` ← **Head:** `feat/ai-settings-page` --- ### 📝 Commits (10+) - [`368264b`](https://github.com/AppFlowy-IO/AppFlowy/commit/368264b3f6a808406fd424fd95049646adf301ad) feat: ai settings page - [`f096ca5`](https://github.com/AppFlowy-IO/AppFlowy/commit/f096ca5f5f17dae3dcf3c66a31d3b212367de092) chore: intergate client api - [`1e3e589`](https://github.com/AppFlowy-IO/AppFlowy/commit/1e3e58926db82cd969ce5a445a99dbe2fce89ad8) chore: intergate client api - [`ff97208`](https://github.com/AppFlowy-IO/AppFlowy/commit/ff97208fbdb3f8696b67a65903bd6d6afd53deab) Merge branch 'main' into feat/ai-settings-page - [`5d7f5b8`](https://github.com/AppFlowy-IO/AppFlowy/commit/5d7f5b8cd65e2269ce93d795f4b8c59929e34ed6) chore: replace open ai calls - [`2a82837`](https://github.com/AppFlowy-IO/AppFlowy/commit/2a82837d9794c95d57f3fca42e34ee3be9b5b313) chore: disable gen image from ai - [`6236fed`](https://github.com/AppFlowy-IO/AppFlowy/commit/6236fed5fa20e47cf696d34daacfc17561f674cb) chore: clippy - [`59c198d`](https://github.com/AppFlowy-IO/AppFlowy/commit/59c198d51689c9bce7e17bd9246ac8a49f765b6b) chore: remove learn about ai - [`53299cb`](https://github.com/AppFlowy-IO/AppFlowy/commit/53299cb1e6bdddad679ffabeff239c75660cc0d3) chore: fix wanrings - [`84ed4d0`](https://github.com/AppFlowy-IO/AppFlowy/commit/84ed4d0241e9cfaf729c86bd8031acda6625433d) chore: fix restart button title ### 📊 Changes **78 files changed** (+1383 additions, -499 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/integration_test/cloud/document_sync_test.dart` (+0 -1) 📝 `frontend/appflowy_flutter/integration_test/desktop/uncategorized/open_ai_smart_menu_test.dart` (+3 -3) 📝 `frontend/appflowy_flutter/integration_test/shared/mock/mock_openai_repository.dart` (+1 -1) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/image/image_placeholder.dart` (+1 -1) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/image/open_ai_image_widget.dart` (+3 -3) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/image/upload_image_menu.dart` (+20 -21) ➕ `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/openai/service/ai_client.dart` (+32 -0) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/openai/service/error.dart` (+5 -5) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/openai/service/openai_client.dart` (+20 -131) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/openai/widgets/auto_completion_node_widget.dart` (+25 -61) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/openai/widgets/loading.dart` (+2 -2) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/openai/widgets/smart_edit_node_widget.dart` (+37 -66) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/openai/widgets/smart_edit_toolbar_item.dart` (+9 -7) 📝 `frontend/appflowy_flutter/lib/startup/deps_resolver.dart` (+4 -6) ➕ `frontend/appflowy_flutter/lib/user/application/ai_service.dart` (+122 -0) 📝 `frontend/appflowy_flutter/lib/user/application/user_listener.dart` (+22 -16) 📝 `frontend/appflowy_flutter/lib/workspace/application/home/home_bloc.dart` (+2 -2) 📝 `frontend/appflowy_flutter/lib/workspace/application/home/home_setting_bloc.dart` (+2 -2) 📝 `frontend/appflowy_flutter/lib/workspace/application/menu/menu_user_bloc.dart` (+2 -2) ➕ `frontend/appflowy_flutter/lib/workspace/application/settings/ai/settings_ai_bloc.dart` (+127 -0) _...and 58 more files_ </details> ### 📄 Description Here's a clearer version of your message: 1. Support switching to other models. The local AI model will be completed in another PR. <img width="689" alt="image" src="https://github.com/AppFlowy-IO/AppFlowy/assets/86001920/2931ed2a-c0e6-4c5a-bef4-41e8af2fa593"> 2. Replace editor OpenAI calls with AppFlowy AI. For example, support improving writing with Claude-3-Sonnet or OpenAI. 3. Support enabling AI search (to be used in a future version). 4. Disable generating images from text. This issue will be fixed in another PR. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 23:17:10 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#6896
No description provided.