This project aims to integrate the [Half-codeInterpreter](https://github.com/jackfood/Half-codeInterpreter) into the free generative AI provided by [gpt4free](https://github.com/xtekky/gpt4free).
This repository contains Python scripts for an AI chat engine that interacts with the GPT-3.5 model and allows code execution. The project consists of three main scripts:
start.py: This script serves as the user interface for the AI chat engine. It takes user input, communicates with the GPT-3.5 model, and handles code execution.
extractpython.py: This script is responsible for extracting Python code blocks from the responses generated by the AI and saving them to a file. It also detects and extracts pip install commands and package names.
aiengine.py: This script interfaces with the GPT-3.5 model using the g4f library to generate AI responses based on user input.
Follow the on-screen instructions. You can enter text input, and the AI will respond accordingly. It can also auto execute Python code by including it within triple backticks or (python) and (). The Python code will be executed, and the result will be displayed.
## Important Notes
To exit the chat engine, type 'exit' when prompted for input.
Extracted Python code blocks are saved in aipythonanswer.txt and utf8.txt. pip.txt contains any extracted pip install package names.
Make sure you have the necessary Python environment and libraries installed to execute the code generated by the AI.
Exercise caution when executing code obtained from external sources.
The main goal of this project is to integrate the Half-codeInterpreter into the gpt4free generative AI. Work is in progress to combine the capabilities of both projects for enhanced functionality.