Skip to content

Latest commit

 

History

History

perform_sentiment_analysis

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Example script: perform sentiment analysis with AgentQL

This example demonstrates how to perform sentiment analysis on YouTube comments with AgentQL and OpenAI's GPT-3.5 model.

Run the script

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

Play with the query

Install the AgentQL Debugger Chrome extension to play with the AgentQL query. Learn more about the AgentQL query language