Skip to content

AyatKhraisat/Retail-Chatbot-with-Azure-OpenAI-LLmaIndex-and-Weviate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Releases

No releases published

Packages

No packages published

Languages