Code Monkey home page Code Monkey logo

retail-chatbot-with-azure-openai-llmaindex-and-weviate's Introduction

Retail Chatbot

This repository demonstrates how to build an AI-powered chatbot with visual Search using the LlamaIndex, Azure OpenAI and weaviate Vector Database.

[[arch.drawio (3).svg]]

🎯 Highlights

  • OpenAI Icon OpenAI Icon Chatbot on top of Azure OpenAI Model

  • OpenAI Icon LlamaIndex to index and query the data

  • Weaviate logo Weaviate Vector Database to store data vectors

  • πŸ“Έ Visual search for a product: you can upload an image for product and the chatbot will provide with similar products we have in the store using OpenAI Vision

  • πŸ‘• Chat with retails store you can ask also chat with the chatbot to help you find what you are looking for

πŸš€ Pre-requisites

Azure OpenAI resource OpenAI Icon

1. Create OpenAI Azure Resource [How-to: Create and deploy an Azure OpenAI Service resource - Azure OpenAI | Microsoft Learn](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/create-resource?pivots=web-portal)
  1. Deploy the following models
  2. Embeddings
  3. GPT-4
  4. GPT-4 - GPT-4 Turbo with Vision Preview

Weaviate cluster Weaviate logo

How to install Weaviate | Weaviate - Vector Database

Installation

Clone the project

git clone https://github.com/mmz-001/knowledge_gpt
cd knowledge_gpt

Install requirements

To install the required Python packages, run the following command:

pip install -r requirements.txt
Create secrets file

Create a secrets.toml file in the .sreamlit folder with the following contents:

##Weaviate  
weaviate_url="<weaviate_url>"  
weaviate_api_key="<weaviate_api_key>"  
class_name="Products"  
  
##Azure OpenAI  
openai_key = "<openai_key>"  
azure_endpoint = "https://<resource_name>.openai.azure.com/"  
api_version ="2024-02-15-preview"   #or the most recent one 
  
## Chat Model  
chat_model_deployment_name="<text>"  
chat_model_name="gpt-4-1106-preview"  #or the most recent one 
  
#embedding model  
embedding_model_deployment_name="<embedding_deployment_name>"  
embedding_model="text-embedding-ada-002"  
  
  
## Vision Model  
vision_model_deployment_name="vision" 

🌟Quick Start

run the Streamlit script

streamlit run main.py 

As soon as you run the script as shown above, a local Streamlit server will spin up and your app will open in a new tab in your default web browser.

retail-chatbot-with-azure-openai-llmaindex-and-weviate's People

Contributors

ayatkhraisat avatar

Stargazers

 avatar

Watchers

 avatar

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.