Skip to content

Latest commit

 

History

History
239 lines (184 loc) · 10.7 KB

README.md

File metadata and controls

239 lines (184 loc) · 10.7 KB

🏢 GPTenterprise 💤 🤖

GPTenterprise

License: MIT python openai

Pylint Pytest Docs

First try on emulating an enterprise with OpenaAI GPT.

This is basically a python package emulating an enterprise. It requests OpenaAI API and generate a sequence of tasks each associated to an employee. Employees are automatically generated (system prompts to tell GPT what employee to be) 🧠.

🌃 Summary

🛰️ About the enterprise (by GPT)

Our innovative company uses advanced artificial intelligence technology to bring products and services to the next level. Our employees are AI instances created with the powerful GPT language model that can perform various roles like engineers, designers, and even marketers. This enables us to develop products faster and more efficiently than traditional companies while also providing a unique experience for our customers.

Our AI employees are equipped with the latest technology and are constantly learning and adapting to new situations. This allows us to be more agile and responsive to market changes, ensuring that our products and services are always at the forefront of innovation.

If you're interested in experiencing the future of AI technology, check out our product.

Disclaimer: Our AI employees are not intended to replace human workers and are designed to be used as a supplement to human teams. We believe in the power of human creativity and intelligence when combined with advanced technology.

🤌 Requirements

python --version
python3 --version
  • Open API key, or a LoacalAI instance, or any other GenAI instance compatible with the openAi python package.

🏄‍♀️ Installation

1 - Clone this repository

git clone https://github.com/nervousapps/GPTenterprise.git

2 - Go in the repo directory

cd GPTenterprise

3 - A python venv is recommended, to create one, in your terminal:

python3 -m venv gptenterprise

And enable it

source ./gptenterprise/bin/activate

4 - Install GPTenterprise package and dependencies by executing:

pip install ./python

🦄 OpenAI key configuration

  • Fill openai_key.txt.template with your opanai key and rename it to openai_key.txt. Or create a new one using:
nano ./openai_key.txt

👉 Quickstart v1

To see an example of what can be done with the idea of GPTenterprise :

1 - Tweek config file in order to give 🦸‍♂️ CEO guidelines (and other parameters if you want but default one should be ok)

nano ./config

2 - Run the enterprise

GPTenterprise ./config

Then the enterprise will be created with your guidelines, a team leader and scrum master will be hired. They will do his best to achieve guidelines.

📚 Documentation

HTML documentation here.

Documentation generated with PDOC

General functioning

An enterprise is composed of a team leader, a scrum master, and several employees. At the beginning, the CEO will create the enterprise giving his guidelines to team leader and scrum master. Each employee will be hired by the team leader for their skills. An employee is defined as a system prompt, automatically generated by the team leader, that describe his skills. The scrum master will then create a sequence of tasks, each associated to an employee previously hired by the team leader.

Managers prompt and object structure

⚠️Managers prompts (team leader and scrum master) defines the object structure for employees and tasks. These structures must not be changed as they are used in the code.

👩‍🦰 Employee structure

{
    "name": "Employee's name",
    "role_name": "Employee's role name",
    "role": "Employee's role (system prompt)"
    "creativity": 1.0
    "emoji": "Emoji code"
}

Name and role_name must be unique.

🔖 Task structure

{
    "task_name": "The task name"
    "employee_name": "The assigned amployee name"
    "todo": "The work description that has to be done"
    "type": "The type of the task (text or image)"
    "requirements": "The index of the required task or no if no task result is required"
}

At each task, the scrum master will add a result field with the employee's work.

🗞️ Production structure

{
    "employees": [employee1, employee2],
    "tasks": [task1, task2],
    "ceo_guidelines":
    "final_product":
}

A field "ceo_guidelines" will be added automatically when creating the enterprise. The final product can be found in the final_product field of the json object contained in "production_<company_name>.json" file in the specified output directory.

CEO guidelines

CEO guidelines must be precise and describe the company and the final product wanted. Number of images to generate can be specified if guidelines, if not, it will be a random number (max 5). Guidelines must have "PRODUCT" word at the end, followed by the description of the desired final product. An example can be given with the keyword "EXAMPLE:", it will be added to employees tasks.

🏷️ Environement variables (config file)

env name description default value
COMPANY_NAME Enterprise name GPTenterprise
KEYFILE Path to openai keyfile.txt ./openai_key.txt
OUTPUT_DIRECTORY Output directory ./generated/v2
MANAGER_RETRY How many times managers will retry to do the plans if failing 1
CUSTOM_MANAGER_PROMPTS_PATH Give a custom managers prompt (be careful to keep objects structure definitions) ""
CEO_GUIDELINES "As a CEO, I want ... PRODUCT ... " Default guidelines
INTERACTIVE Wait for user entry (basic for now), no employee interaction if asynchronous mode is activated "no"
ASYNCHRONOUS Asynchronous mode, employees can work in parallel "yes"
LOCAL_AI_URL Url of a local instance of an api compatible with openAi python package ""
MODEL_NAME Model name to use gpt-3.5-turbo-16k

🎢 Going further

✅ Tests

1 - Install tests requirements

pip install -r ./python/requirements-tests.txt

2 - Run tests

pytest

♻️ Formatter

BLACK

🦝 Miscelleneous

👵 Quickstart POC

To see an example of what can be done with the idea of GPTenterprise, let use the webgpt.py

WebGPT is an AI driven enterprise that develop website for its clients.

It is composed of several GPT employees (prompts):

  • ✍️ a subject prompter, that is responsible of formulating subjects.

  • 📸 a dall-e prompter, that is responsible of generating prompts to inject to dall-e for generating images on the previously generated sibject.

  • 🖥️ a web developer, that is responsible of coding the website on previously generated subject and images.

  • 🦸‍♂️ a CEO (you), that is responsible of driving all of this and run the enterprise.

To run the enterprise please do:

python ./examples/webgpt.py

🎠 Disclaimers

This is not an official OpenAI product. This is a personal project and it is not affiliated with OpenAI in any way.

📒 License

License MIT