1.0.2 • Published 11 months ago

editorjs-expand v1.0.2

Weekly downloads
-
License
-
Repository
-
Last release
11 months ago

Editorjs-Expand

Inline tool for expanding content with header by AI.

intro

Installation

Use your package manager to install the package editorjs-expand.

npm install editorjs-expand

yarn add editorjs-expand

Usage example

    const editor = new EditorJS({
      tools: {
        header: {
          class: Header,
          tunes: ['expand']
        },
        expand: {
          class: Expand,
          config: {
            url: 'your_ai_endpoint',
            method: 'request_method',
            model: 'gpt-3.5-turbo',
            credential: {
              'Content-Type': 'application/json',
              Authorization: 'Bearer xxxx'
            },
            genPrompts: (origin) => {
              return `What is :${origin}`
            }
          }
        }
      }
    });
1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago