The codebase builds a chat with your video promptflow. It uses GPT4V and Azure AI Computer Vision services. The flow allows you to:
- Chat with your video file
To modify the system message, go to QuestionGPT
The inputs to the promptflow are as follows:
- "question": The question you want to ask over the video
- "video_id": ID of the indexed video,
- "video_index_name": Name of the index
- "video_sas_url": SAS URL of the video file. The video should be uploaded to a BLOB store and SAS URL to be provided as input
- Azure OpenAI Service with GPT4 Vision model deployed
- Azure AI Service -Computer Vision service
- Azure Machine Learning Workspace - (Optional) needed to run promptflow on Azure
- Python 3.10+ - (Optional) To execute code locally
- Video uploaded to a BLOB store and SAS URL generated
- Video indexed within the CV service - see create_video_index.py to index a video in your computer vision service
- Clone this repository in your local machine
- Login to the Azure Portal and navigate Azure Machine Learning
- Create a compute instance
- Create a promptflow runtime
- Create a Custom Connection and name it "CREDENTIALS". Provide the following keys and values:
- VISION_API_ENDPOINT
- GPT_4V_ENDPOINT
- GPT_4V_KEY (Please select the secret checkbox)
- VISION_API_KEY (Please select the secret checkbox)
- Navigate to the flow and start testing
- Install Promptflow for VSCode extension in VSCode
- Create conda env or venv (optional) -
python -m venv .venv
- Install dependecies -
pip install -r requirements.txt
- Create connection
- Edit the yaml/connection.yaml file
- Execute command -
pf connection create -f yaml/connection.yaml
- Start testing -
pf flow test --flow "<path to the flow.dag.yaml file" --interactive --multi-modal
The above step should redirect you to a local browser with a view like this:
If you face any error, try the pf flow
command without the --multi-modal input, this should allow you to test the code in an interactive manner on the CLI