Code Monkey home page Code Monkey logo

chatbot-csv's Introduction

ChatBot-CSV πŸ€–

An AI chatbot featuring conversational memory, designed to enable users to discuss their CSV data in a more intuitive manner. πŸ“„

By integrating the strengths of Langchain and OpenAI, ChatBot-CSV employs large language models to provide users with seamless, context-aware natural language interactions for a better understanding of their CSV data.🧠

For better understanding, see my medium article πŸ–– : Build a chat-bot over your CSV data

Quick Start πŸš€

To use ChatBot-CSV, simply visit the following link :

TO-DO :

  • print tokens utilizations for the conversation
  • Replace chain of the chatbot by a custom agent for handling more features ans ask questions about all informations of the files + memory + vectorstore

Running Locally πŸ’»

Follow these steps to set up and run the service locally :

Prerequisites

  • Python 3.8 or higher
  • Git

Installation

Clone the repository :

git clone https://github.com/yvann-hub/ChatBot-CSV.git

Navigate to the project directory :

cd ChatBot-CSV

Create a virtual environment :

python -m venv .venv
.\.venv\Scripts\activate

Install the required dependencies in the virtual environment :

pip install -r requirements.txt

Launch the chat service locally :

streamlit run src/chatbot_csv.py

That's it! The service is now up and running locally. πŸ€—

Information πŸ“:

ChatBot-CSV features a chatbot with memory and a CSV agent. The chatbot is specialized in discussing unique elements within the CSV with the user in a friendly and conversational manner (limited to about 4 rows at a time due to the nature of the ConversationalRetrievalChain). It is more suitable for a use case where a company uses a CSV to feed their chatbot, so it can answer questions from a user seeking information without necessarily knowing the data behind the chatbot. You can modify the prompt template in the code to customize the chatbot's response phrasing for your specific case.

Example: Q: I'm looking for a restaurant in New York, what do you suggest? A: You can try Tower Restaurant, which offers an Γ  la carte menu and has promotions on Tuesdays. You can contact them at 0654589874 for more information.

The CSV Agent, on the other hand, executes Python to answer questions about the content and structure of the CSV. It requires precise questions about the data and provides factual answers. It is not limited to a specific number of rows and can analyze the entire file, but it needs clear and accurate instructions. It also doesn't have memory.

Example: Q: What's the square root of the average age? A: '5.449689683556195'

Contributing πŸ™Œ

Contributions are always welcome! If you want to contribute to this project, please open an issue, submit a pull request or contact me at [email protected] (:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.