Skip to content

Repository files navigation

🛍️ Bargaining Chatbot API

This project implements a Negotiation Chatbot using FastAPI and an LLM-based model. The chatbot mimics a shopkeeper who negotiates with customers.

📂 Project Structure

  • process_data.py → Preprocesses and structures bargaining conversations into JSON.
  • negotiation_bot.py → Handles negotiation logic and calls the LLM for responses.
  • api.py → FastAPI backend for handling chatbot API requests.

🚀 Setup Instructions

1️⃣ Install Dependencies

Ensure you have Python 3.8+ installed.
Run the following command:

pip install -r requirements.txt

2️⃣ Run the API Server

Start the FastAPI server using:

python api.py

3️⃣ Test the Chatbot API

Use Postman, Curl, or any API tool to interact with the chatbot.

✅ API Endpoint:

POST http://localhost:8000/chat/

🔹 Example Request:

{
  "message": "Can I get a discount on this?"
}

🔹 Example Response:

{
  "shopkeeper": "This is a premium item. I can offer a 10% discount."
}

🎥 Demo

Bargain.AI.Video.Demo.mp4

🤝 Contributing

Feel free to open issues or submit pull requests for improvements!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages