Skip to content

Latest commit

 

History

History

code

Introduction

This directory contains the code for our paper. Content of different files:

To run the code, you need to set up API keys from OpenAI, Together.ai, and Google and put them in api_keys.json.

You can then run the code with the following command:

python query_llm.py /path/to/domain_list.csv openai "gpt-4o-mini-2024-07-18" dem /path/to/output_dir

This will query the gpt-4o-mini-2024-07-18 model identified as a Democrat on the domains in domain_list.csv and save the results in output_dir.

Dependencies

  • together
  • openai
  • google-generativeai
  • tqdm
  • pandas
  • pydantic
  • json_repair

The code has been tested on Python 3.10.