You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jackfood 3996d1f9c4
Update README.md
1 year ago
README.md Update README.md 1 year ago
aiengine.py aiengine.py 1 year ago
extractpython.py Rename ~extractpython.py to extractpython.py 1 year ago
requirements.txt Add files via upload 1 year ago
~start.py ~start.py 1 year ago

README.md

Half-CodeInterpreter_gpt4free_embedded (This is an imcomplete project as of now)

This project aims to integrate the Half-codeInterpreter into the free generative AI provided by 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.

Getting Started

To get started, follow these steps:

  1. Visit the gpt4free GitHub repository and install the PyPI package in your Python environment:

    • pip install -U g4f
  2. Clone or download this repository and put it in your Python directory.

  3. Run the following command:

    • python ~start.py

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

Do note that the stability depends on the free provider from ##gtp4free.

To exit the chat engine, type 'exit' when prompted for input.

Extracted Python code blocks are saved in aipythonanswer.txt, and pip.txt contains any extracted pip install package names which links to installpip.py.

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.

Integration

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.

Contributing

We welcome contributions! If you want to contribute to this project, please follow our contribution guidelines.