This example demonstrates how to perform sentiment analysis on YouTube comments with AgentQL and OpenAI's GPT-3.5 model.
- Install AgentQL SDK
- Install OpenAI SDK with the following command:
pip install openai
- Save this python file locally as main.py
- Set your OpenAI API key as an environment variable with the following command:
export OPENAI_API_KEY="My API Key"
- Run the following command from the project's folder:
python3 main.py
Install the AgentQL Debugger Chrome extension to play with the AgentQL query. Learn more about the AgentQL query language