Skip to content

tejartr7/XAI-Chatbot

Repository files navigation

Chatbot using XAI API

This project is a chatbot built using the XAI API, Next.js, and Tailwind CSS. The chatbot leverages the powerful AI capabilities of XAI to provide intelligent conversations. The project is fully deployed on Vercel, and you can try it live!

Features

  • Built with Next.js for server-side rendering and routing.
  • Styled with Tailwind CSS for responsive and modern design.
  • Integrated with XAI API for natural language processing and chatbot functionality.

Getting Started

To set up the project locally, follow these steps:

Prerequisites

  • Node.js (Recommended version: 16+)
  • npm (Node Package Manager)

1. Clone the repository

Clone this repository to your local machine using the following command:

git clone https://github.com/tejartr7/XAI-Chatbot

2. Install dependencies

Navigate into the project folder and run the following command to install the necessary dependencies:

cd your-repo-name
npm install

3. Set up XAI API key

To interact with the XAI API, you'll need to get an API key. Here's how you can do that:

  • Go to the XAI Console.
  • Create an account or log in to generate your API key.
  • Copy your NEXT_PUBLIC_XAI API key.

4. Add the API key to the .env.local file

Create a .env.local file in the root of the project if it doesn't already exist, and add your XAI API key like this:

NEXT_PUBLIC_XAI=<your-xai-api-key>

5. Run the development server

Start the development server by running the following command:

npm run dev

Visit http://localhost:3000 in your browser to see the chatbot in action.

Deployed Project

The project is deployed and can be accessed via Vercel. Here's the link to the live version:

Live Chatbot

API Documentation

To learn more about how the XAI API works and its available endpoints, you can check out the official documentation:

Contributing

Feel free to open an issue if you find any bugs or have any suggestions for improvements! Pull requests are always welcome.

Give it a Star! ⭐

If you like the project, please give it a star on GitHub!

License

This project is open-source and available under the MIT License.

Releases

No releases published

Packages

No packages published