cyrox/chatbot

This package is abandoned and no longer maintained. The author suggests using the https://github.com/Nathanial01/cyroxbot package instead.

Light chatbot that can be embedded in any website via composer

Installs: 40

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:Blade

dev-main 2025-01-01 17:30 UTC

This package is auto-updated.

Last update: 2025-01-02 14:39:48 UTC


README

#composer require cyrox/chatbot:dev-main#

Cyrox Chatbot This is a lightweight chatbot package that can be easily embedded into any website via Composer. It integrates with OpenAI to provide chatbot functionality. Installation and Setup

install as fallow #composer require cyrox/chatbot:dev-main# and then publis the vandor php artisan vendor:publish --tag=chatbot-migrations php artisan vendor:publish --tag=chatbot-views
php artisan vendor:publish --tag=chatbot-config
php artisan vendor:publish --tag=cyrox-chatbot-assets

then add the tmplate any whare u want @include('vendor.cyrox.chatbot.chatbot')

run migration 

php artisan make:migration create_chat_histories_table --path=packages/Cyrox/Chatbot/Database/migrations

and dont forget to add ur open ai key in env varables ie OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx image

set up in laravel inertia react

create a compenent Chatbot.jsx

import React, { useState } from "react";

const ChatbotPage = () => { const [isVisible, setIsVisible] = useState(true);

return (
    isVisible && (
       

            <iframe
                src="/chatbot-blade"
                className=" fixed w-96  border-none rounded-lg bottom-5 right-1 h-full z-[1] shadow-lg bg-none rounded-lg"
                title="Chatbot"
            ></iframe>
 
    )
);

};

export default ChatbotPage;

then make a ChatbotControlller

with('content', view('vendor.cyrox.chatbot.chatbot')); } } finally addd these route Route::get('/chatbot-blade', function () { return view('vendor.cyrox.chatbot.chatbot'); });