@ebereplenty/chatbot
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

React Chatbot

Add an ai-powered chatbot widget to a react or nextjs application in 5 minutes using this package. It uses the functionalities of ChatGPT provided by OpenAI.

Installation

npm

npm i @ebereplenty/chatbot

yarn

yarn add @ebereplenty/chatbot

Usage

Create Openai API Key

Regular

The example below adds the default chatGPT behavior to your application.

  <BasicChat openAiApiKey={open_ai_API_key} />

Personalize

The example below adds a personalized chatbot to your application by the systemPrompt props.

  <BasicChat 
    openAiApiKey={open_ai_API_key}
    chatTitle={"Wildlife Chat"}
    systemPrompt={
      `
        Your name is Ebere. You are wildlife expert. 
        The only thing you talk about is on wildlife related topics. 
        Always begin a discussion by introducing yourself
      `
    }
  />
  • systemPrompt props tells the chatbot how it should behave
  • chatTitle props adds a title to the UI.

Dependencies

Documentation

See https://github.com/EBEREGIT/react-chatbot/blob/master/README.md

Author

Njoku Samson Ebere: https://linktr.ee/ebereplenty

Package Sidebar

Install

npm i @ebereplenty/chatbot

Weekly Downloads

3

Version

1.0.1

License

MIT

Unpacked Size

23.4 kB

Total Files

6

Last publish

Collaborators

  • ebereplenty