The file assistantai-codeinterpreter.py contains sample code to invoke the Assistant API for data analysis purposes.
The file codeinterpreter-api.py contains sample code to invoke the Codeinterpreter API for data analysis purposes.
- pip install -r requirements.txt
- export OPENAI_API_KEY={your key obtained from https://openai.com}
- authenticate with your GCP account to access BigQuery sample (public Austin crime incidents dataset): gcloud auth application-default login
- replace my-gcp-project, with your GCP project
You can skip the BigQuery part, by commenting out the code which connects to GCP. Alternatively you can prepare your data in the file "df.csv".