npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vcf-chatbot-ai

v0.0.3-rc

Published

VCF Chatbot AI

Downloads

17

Readme

vcf-chatbot-ai

The vcf-chatbot-ai package allows you to easily integrate a chatbot into your web applications. It supports customization options such as changing the title, image, and primary color of the chatbot.

Installation

To install the package, run the following command in your project directory:

npm install vcf-chatbot-ai

Usage

Import Chatbot from the vcf-chatbot-ai package and initialize it with optional parameters to customize the chatbot. Then, call the display() method to render the chatbot on your page.

import Chatbot from 'vcf-chatbot-ai';

const chatbot = new Chatbot({
  botTitle: "Support", // Optional: Customize the title of the chatbot
  botImage: "https://example.com/chatbot.png", // Optional: Provide a custom image URL for the chatbot
  primaryColor: "#00ff00", // Optional: Customize the primary color of the chatbot
  env: "development" // Optional: Default: 'production' ('development' or 'production')
});

chatbot.display();

Configuration Option

When initializing the Chatbot, you can pass an object with the following optional properties to customize the chatbot:

botTitle (string): The title of the chatbot. Default is 'ChatBot'. botImage (string): The URL of the image to be used as the chatbot's icon. Default is a sample chatbot image. primaryColor (string): The primary color used in the chatbot theme. Default is '#581B98'. env (string): The environment the chatbot is running in. Must be either 'development' or 'production'. This is required for proper initialization Default at version 1.0 will be 'production' to directly communicate with the backend.

Methods

display()

Renders the chatbot on the page. Call this method after initializing the Chatbot instance to display the chatbot to the user.

For use with server side rendered frameworks this method will need to work once mounted on DOM

eg SvelteKit

<script>
	
  import Chatbot from 'vcf-chatbot-ai'
  import {onMount} from 'svelte'


onMount(()=>{
  const chat = new Chatbot({
    botTitle: "Bolt"
  })
  
  chat.display()

})
</script>

To intergrate with phoenix framework in assets/app.js

import "phoenix_html"
// Establish Phoenix Socket and LiveView configuration.
import {Socket} from "phoenix"
import {LiveSocket} from "phoenix_live_view"
import topbar from "../vendor/topbar"
import Chatbot from 'vcf-chatbot-ai'

chat = new Chatbot({
  botTitle: "Hello World"
})

chat.display()

This should render as VCF ChatbotImage

Support

For support, issues, or feature requests, please visit our GitHub repository.

License

This project is licensed under the MIT License - see the LICENSE file for details.