
Chat GPT Code Interpreter Scraper
This Actor is unavailable because the developer has decided to deprecate it. Would you like to try a similar Actor instead?
See alternative Actors
Chat GPT Code Interpreter Scraper
Generate Python code using ChatGPT and run in a live Python environment. This a sandboxed Python environment where you can execute Python code to perform any task you like. Input a natural language prompt and ChatGPT will generate Python code to perform a task and the code will be executed in Apify.
Generate Python code using ChatGPT and run in a live Python environment. This a sandboxed Python environment where you can execute Python code to perform any task you like. Input a natural language prompt and ChatGPT will generate Python code to perform a task and the code will be executed and run in Apify.
Features
- Internet access
- Auto Python package installation: The application can install python packages on demand if not available to the environment
- Popular python packages are pre-installed for fast execution
- Input
text + files
-> Receivetext + files
- Conversation Memory: respond based on previous inputs
- If the code errors it will retry attempts to get the code correct
- Convert Files
Input Schema
prompt
(required) The prompt to ask ChatGPT
runCode
Use the code interpreter. This will instruct ChatGPT to generate Python code and then run the Python code to generate a result
files
List of files to upload to the Actor. The files will be uploaded and given to ChatGPT in the prompt. This allows ChatGPT to write code to analyze and act on files.
Each file can include the following properties:
- url
- filename
- description
1[ { 2 "url": "https://raw.githubusercontent.com/shroominic/codeinterpreter-api/main/examples/assets/iris.csv", 3 "filename": "iris.csv", 4 "description": "Column names are: SepalLengthCm,SepalWidthCm,PetalLengthCm,PetalWidthCm,Species" 5}]
dataset_ids
List of files to Apify dataset_ids to upload to the Actor. The datasets will be uploaded and given to ChatGPT in the prompt. This allows ChatGPT to write code that to analyze and act on Apify Datasets.
Each Dataset can include the following properties:
- dataset_id
- filename
- description
1[ { 2 "dataset_id": "vSvgrBzyWVRqiMCSa", 3 "filename": "iris.csv", 4 "description": "Column names are: SepalLengthCm,SepalWidthCm,PetalLengthCm,PetalWidthCm,Species" 5}]
Output Schema
The output dataset contains the following fields:
- responseType: (text or file)
- value: If responseType is text then the value contains the text response from the LLM. If it is a file then it contains the filename of the file generated by the code interpreter
- contentType: If responseType is text than application/text. If the response type is file then the mime type for the file
Examples
Use the internet
Prompt
Plot the bitcoin chart of 2023 YTD
Output
Bitcoin YTD Chart Output
Input
1{ 2 "prompt": "Plot a chart of BTC's price for 2023 YTD" 3}
Manipulate an Image
Prompt
Convert the image to black and white
Before / After Image


Input
1{ 2 "files": [ 3 { 4 "url": "https://firebasestorage.googleapis.com/v0/b/kongo-ln.appspot.com/o/dog.png?alt=media&token=47274898-bae4-4096-9b0b-dae1a8a14e4d", 5 "filename": "dog.png", 6 "description": "Dog in the forest" 7 } 8 ], 9 "prompt": "Convert the image to black and white", 10 "runCode": true, 11 "datasetIds": [] 12}
Analyze an uploaded Dataset
Prompt
Analyze this dataset and plot something interesting about it.
Output
Input
1{ 2 "files": [ 3 { 4 "url": "https://firebasestorage.googleapis.com/v0/b/kongo-ln.appspot.com/o/iris.csv?alt=media&token=5fa04eac-7574-4e3d-8c8f-06b12a1a4a39", 5 "filename": "iris.csv", 6 "description": "Column names are: SepalLengthCm,SepalWidthCm,PetalLengthCm,PetalWidthCm,Species" 7 } 8 ], 9 "prompt": "Analyze this dataset and plot a pairplot for the dataset." 10}
Generate a QR Code
Prompt
generate a qr code for the following link: https://www.apify.com
Output
Input
1{ 2 "prompt": "generate a qr code for the following link: https://www.apify.com", 3 "runCode": true, 4 "datasetIds": [] 5}
Chat with ChatGPT
Prompt
Summarize the ChatGPT Code Interpreter Feature
OpenAI API Token
Open API Token
ChatGPT Model
Model to use. Make sure gpt-4 is enabled for your account if you choose gpt-4.
Output
The ChatGPT Code Interpreter feature is a powerful and efficient tool for developers to interpret code. It allows users to input code snippets and receive a response from an AI-powered virtual interpreter that provides context for the code. It can be used to debug and troubleshoot code, as well as to get advice on how to improve code. It is an easy-to-use way to quickly understand code and get help on how to use it.
Input
1{ 2 "prompt": "Summarize the ChatGPT Code Interpreter Feature", 3 "runCode": false, 4 "datasetIds": [] 5}