Skip to content

[spike] plugin and app should be able to subscribe and emit events using core module #357

@louis-jan

Description

@louis-jan

Problem

  • The app can only invoke extension handlers (registered by plugins), which is suitable for simple tasks, such as inserting or updating data.
  • We need a mechanism to let plugin control over the entire LLM streaming and update app states, create a communication channels between app & plugins.
  • Cases: move streaming session & download progress retrieval to plugin

Solution

  • The event emitter mechanism helps to address more complex tasks, like managing the entire LLM stream or handling multiple bots replying.
  • This will also enable the ability to build Use-Case Plugins. With this capability, plugins can now control the entire LLM inference process, from receiving the message to updating it. For example, if the app sends a message, the plugin can build a chain of agents to process it and gradually update the message.

App now wrap the entire streaming process

Image

Plugin should be able to control over the llm agent and sync states:

Screenshot 2023-10-15 at 15 20 09

Use case based plugin:

Screenshot 2023-10-15 at 14 57 04

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions