Skip to content

Add LLM chat history widget #3907

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

Merged
merged 3 commits into from
May 17, 2025
Merged

Add LLM chat history widget #3907

merged 3 commits into from
May 17, 2025

Conversation

christian-byrne
Copy link
Contributor

@christian-byrne christian-byrne commented May 16, 2025

Adds display_component websocket message for custom nodes to display Vue components by name at any point during execution, while also passing props.

Adds DOM widget for displaying LLM chat history, allowing you to view the entire chat history of a particular node instance and additionally return to previous points in the conversation.

Can be used from python node code like:

class ExampleNode:
      @classmethod
      def INPUT_TYPES(cls) -> InputTypeDict:
          return {
              "hidden": {
  
                  "unique_id": "UNIQUE_ID",
              },
          }
    FUNCTION="f"
    def f(self, unique_id):
        render_spec = {
            "node_id": unique_id,
            "component": "VueComponentName",
            "props": {
                "key": "set a new key to avoid replacing the existing component",
                "class" : "text-xs dark-theme:bg-transparent",
                "primevue prop name" : "primevue prop value"
            }
        }
        PromptServer.instance.send_sync(
            "display_component",
            render_spec,
        )

┆Issue is synchronized with this Notion page by Unito

@christian-byrne christian-byrne marked this pull request as ready for review May 16, 2025 21:33
@huchenlei huchenlei merged commit 4cad1a9 into main May 17, 2025
10 checks passed
@huchenlei huchenlei deleted the chat-history-widget branch May 17, 2025 02:00
christian-byrne added a commit that referenced this pull request May 20, 2025
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.

2 participants