DocsGPT/extensions/react-widget
2023-09-12 16:39:09 +01:00
..
dist Local storage sync 2023-09-12 16:39:09 +01:00
public react-widget 2023-09-12 14:01:12 +01:00
src Local storage sync 2023-09-12 16:39:09 +01:00
index.html react-widget 2023-09-12 14:01:12 +01:00
index.ts react-widget 2023-09-12 14:01:12 +01:00
package-lock.json Local storage sync 2023-09-12 16:39:09 +01:00
package.json Local storage sync 2023-09-12 16:39:09 +01:00
postcss.config.cjs react-widget 2023-09-12 14:01:12 +01:00
README.md widget 0.2.0 2023-09-12 15:41:05 +01:00
tailwind.config.cjs react-widget 2023-09-12 14:01:12 +01:00
tsconfig.json react-widget 2023-09-12 14:01:12 +01:00
tsconfig.node.json react-widget 2023-09-12 14:01:12 +01:00
vite.config.ts react-widget 2023-09-12 14:01:12 +01:00

DocsGPT react widget

THis widget will allow you to embed a DocsGPT assistant in your react app.

Installation

npm install  docsgpt

Usage

    import { DocsGPTWidget } from "docsgpt";
    import "docsgpt/dist/style.css";

    const App = () => {
      return <DocsGPTWidget />;
    };

To link the widget to your api and your documents you can pass parameters to the component.

    import { DocsGPTWidget } from "docsgpt";
    import "docsgpt/dist/style.css";

    const App = () => {
      return <DocsGPTWidget apiHost="http://localhost:7001" selectDocs='default' apiKey=''/>;
    };

Our github

DocsGPT

You can find the source code in the extensions/react-widget folder.