harshshredding / ChatGPT_utils

Some useful code for querying ChatGPT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ChatGPT_utils

Some useful code for querying ChatGPT.

Requirements

Works with Python version 3.10 and above ; We use an Anaconda python 3.10 environment.

You can create an anaconda python 3.10 environment called my_env with:

conda create --name my_env python=3.10

To install dependencies, do the following in your environment:

pip install -r requirements.txt

Usage

Run python chatgpt.py to query chatgpt twice with the following two example queries:

1) What is the capital of France ?
2) What is the capital of India ?

It should store the results in ./test.json, as follows:

[[0, "The capital of France is Paris."], [1, "The capital of India is New Delhi."]]

About

Some useful code for querying ChatGPT


Languages

Language:Python 100.0%