AppFlowy-IO / AppFlowy

Bring projects, wikis, and teams together with AI. AppFlowy is an AI collaborative workspace where you achieve more without losing control of your data. The best open source alternative to Notion.
https://www.appflowy.io
GNU Affero General Public License v3.0
55.99k stars 3.64k forks source link

[FR] : AI Writers #2782

Closed yatendra2001 closed 5 months ago

yatendra2001 commented 1 year ago

Description

AI-powered writing assistant using Flutter and the GPT-4 model from OpenAI. The assistant, tentatively named "AI Writers", will assist users in generating and organizing content efficiently. This includes automatic to-do list generation, blog post drafting, and outline creation.

Similar to the notion AI, we can keep a button or just press space for "ask AI"

Screenshot 2023-06-12 at 2 25 55 PM

Timeline:

Week 1 (19/06/2023):

Tasks:

Milestones:

  1. Gain a comprehensive understanding of GPT-4 capabilities and functionalities
  2. Gain in depth understanding of appflowy best coding practices integrated in CI/CD.
  3. Determine if there are existing Rust libraries available for GPT-4 integration

Week 2 (26/06/2023):

Tasks:

Milestones:

  1. Develop a basic Rust wrapper for OpenAI API with minimal functionality
  2. Understand basic structure and components of AppFlowy backend

Week 3 (03/07/2023):

Tasks:

Milestone:

  1. Build an end-to-end demo system using gpt-4 with proper prompting

Week 4 (10/07/2023):

Tasks:

Milestones:

  1. Upgrade Rust wrapper for OpenAI API with advanced features
  2. Gain a deep understanding of AppFlowy backend, including data flows and dependencies
  3. Raise a PR for issue. (raised pr: #3009)

Week 5 (17/07/2023):

Tasks:

Milestones:

  1. Finalize application design and UI.
  2. Begin the process of integrating GPT-4 Rust Wrapper with rust backend structure.
  3. Successfully integrate GPT-4 Rust Wrapper with rust backend structure.
  4. Initiate the development of the to-do list feature.

Week 6 (24/07/2023):

Tasks:

Milestones:

  1. Complete the development of the to-do list feature
  2. Initiate the development of the outline creation feature

Midterm Valuation


Week 7 (31/07/2023):

Tasks:

Milestones:

  1. Achieve modular and scalable Rust wrapper API code.
  2. Completed tests for the API with 100% coverage.

Week 8 (07/08/2023):

Tasks:

Milestones:

  1. Completed and polished frontend Flutter interface.
  2. Full test coverage for the entire frontend interface.
  3. Deep understanding of the integration flow from backend to frontend.

Week 9 (14/08/2023):

Tasks:

Milestones:

  1. Successfully fixed the Evernote importer issue (#2971).
  2. Successful integration of the Rust wrapper API with the Flutter frontend.
  3. Completed tests for the integrated system.

Week 10 (21/08/2023):

Tasks:

Milestones:

  1. Complete the project documentation
  2. Address and fix any bugs or issues that may arise during testing.
  3. Initiate the migration of current OpenAI features to using Rust wrapper

Week 11 (28/08/2023):

Tasks:

Milestones:

  1. Successfully migrate all current OpenAI features to use Rust wrapper
  2. Continue comprehensive testing and debugging of the entire application
  3. Ensure all identified issues are resolved and application is fully functional

Week 12 (04/09/2023):

Tasks:

Milestones: 30.Successful project review and preparation for final live deployment.

  1. Successfully prepare the application for deployment, with all features working as expected
  2. Completion of a comprehensive blog documenting the entire project.

Impact

The successful implementation of this project will provide a powerful tool for users who require assistance with various writing tasks. By automating these tasks, users can focus more on their ideas and less on the mechanical aspects of writing.

Given the increasing demand for AI-powered tools and the widespread use of mobile devices, this project can potentially benefit a wide range of users.


Additional Context

No response

yatendra2001 commented 1 year ago

@LucasXu0 Can you please review this?

LucasXu0 commented 1 year ago

Hey, @yatendra2001. It looks good to me. By the way, please add one more task: migrate the current openAI features by using Rust wrapper too.

enum OpenAIRequestType {
  textCompletion,
  textEdit;

  Uri get uri {
    switch (this) {
      case OpenAIRequestType.textCompletion:
        return Uri.parse('https://api.openai.com/v1/completions');
      case OpenAIRequestType.textEdit:
        return Uri.parse('https://api.openai.com/v1/edits');
    }
  }
}
LucasXu0 commented 1 year ago

We are currently using text completion and text edit APIs on the Flutter side. We should migrate them to Rust APIs once you finish this FR.

yatendra2001 commented 1 year ago

Hey, @yatendra2001. It looks good to me. By the way, please add one more task: migrate the current openAI features by using Rust wrapper too.

enum OpenAIRequestType {
  textCompletion,
  textEdit;

  Uri get uri {
    switch (this) {
      case OpenAIRequestType.textCompletion:
        return Uri.parse('https://api.openai.com/v1/completions');
      case OpenAIRequestType.textEdit:
        return Uri.parse('https://api.openai.com/v1/edits');
    }
  }
}

Yes makes a lot of sense.

We are currently using text completion and text edit APIs on the Flutter side. We should migrate them to Rust APIs once you finish this FR.

Yup added at the end. We'll keep adding subtasks of migration as we figure out to keep a record.

annieappflowy commented 1 year ago

Related to https://github.com/AppFlowy-IO/AppFlowy/issues/2286

yatendra2001 commented 1 year ago

Hi @annieappflowy, @LucasXu0,

I'm looking forward to contributing to this project and am ready to start working on the issue at hand. However, I want to make sure I align with the selection process properly. Should I wait for the proposal to be accepted before proceeding, or is it acceptable to begin in advance? This is particularly important as I have outlined a timeline in my proposal.

annieappflowy commented 1 year ago

I've sent an official letter to you! You may start working on your project. Congrats!

yatendra2001 commented 1 year ago

Thanks a lot, @annieappflowy for accepting my proposal. You can bet I'll be bringing my A-game to this mentorship.

yatendra2001 commented 1 year ago

Hey @LucasXu0 , Should I create a new PR now to keep you updated of my tasks or once my first commit is ready to get merged??

LucasXu0 commented 1 year ago

@yatendra2001 No, we can communicate with them via video meeting, just like we did previously.

lybing commented 1 year ago

When the network is abnormal, keep circling and need to close the software to exit. Snipaste_2023-08-02_23-10-07