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) π§ .
- π°οΈ About the enterprise (by GPT)
- π€ Requirements
- πββοΈ Installation
- π¦ OpenAI key configuration
- π Quickstart v1
- π Documentation
- π’ Going further
- β Tests
- β»οΈ Formatter
- π¦ Miscelleneous
- π Disclaimers
- π License
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.
- Python 3.9 or newer (needs of asyncio.to_thread())
python --version
python3 --version
- Open API key, or a LoacalAI instance, or any other GenAI instance compatible with the openAi python package.
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
- 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
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 generated with PDOC
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.
π©βπ¦° 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 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.
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 |
- rework managers prompt β°
- enhanced employees interactions
- asynchronous operations βοΈ
- multi managers enterprise
- keep previous responses in memory (maybe use https://github.com/acheong08/ChatGPT)
- internet search (python only to avoid using openAI's token)
- use https://python.langchain.com/en/latest/index.html to simplify code
- DAN and other modes
- add stream mode
- add rework task stage
1 - Install tests requirements
pip install -r ./python/requirements-tests.txt
2 - Run tests
pytest
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
This is not an official OpenAI product. This is a personal project and it is not affiliated with OpenAI in any way.