Home  >  Article  >  Technology peripherals  >  Really low code! PromptAppGPT, the first natural language development framework based on ChatGPT: fully automatic compilation, operation, and interface generation

Really low code! PromptAppGPT, the first natural language development framework based on ChatGPT: fully automatic compilation, operation, and interface generation

WBOY
WBOYforward
2023-06-07 14:19:591170browse

Recently, Zhang Changwang, a member of the CCF Theoretical Computer Science and Technology Committee, developed a rapid application development framework PromptAppGPT based on low-code prompts, which can realize rapid application development of natural language based on GPT.

PromptAppGPT includes functions such as: low-code prompt (Prompt) application development, GPT text generation, DALL-E image generation, online code editor compiler runner, automatic user interface generation, support for plug-in extensions, etc. .

Really low code! PromptAppGPT, the first natural language development framework based on ChatGPT: fully automatic compilation, operation, and interface generation

Project website: https://www.php.cn/link/fac05328668f599efe18e76cdb284aab

Project code: https://github.com/mleoking/ PromptAppGPT

PromptAppGPT provides multi-task condition triggering, result verification and failure retry capabilities, which can turn manual generation tasks that originally require multiple steps into automatic completion.

At the same time, users no longer need to memorize and enter tedious prompt spells by themselves. They can easily complete the task by only entering the core necessary information of the task.

Really low code! PromptAppGPT, the first natural language development framework based on ChatGPT: fully automatic compilation, operation, and interface generation

1. Project features

  • Low code prompt (Prompt) rapid application development
  • Support GPT3/4 executor For text generation
  • Support Dalle executor for image generation
  • Support the use of executor (plug-in) extensions
  • Built-in online code editor, compiler and runner
  • Automatically generate user interface
  • Bilingual user interface in English and Chinese

2. Quick Start

2.1. Obtain the API key of OpenAI.

2.2. Visit the PromptAppGPT website and select network startup or download the program:

https://www.php.cn/link/fac05328668f599efe18e76cdb284aab

2.3. Set OpenAI key/OpenAI Api Proxy/OpenAI GPT model.

OpenAI Key: API key obtained from OpenAI.

OpenAI Api Proxy: You can access the proxy website of OpenAI API. For example, you can use https://api.openai-proxy.com in China. It is best to have a proxy website built by yourself.

OpenAI GPT model: gpt-4/gpt-3.5-turbo

Really low code! PromptAppGPT, the first natural language development framework based on ChatGPT: fully automatic compilation, operation, and interface generation

2.4. Select and run an application.

Really low code! PromptAppGPT, the first natural language development framework based on ChatGPT: fully automatic compilation, operation, and interface generation

2.5. Edit and compile the application.

Really low code! PromptAppGPT, the first natural language development framework based on ChatGPT: fully automatic compilation, operation, and interface generation

3. APP Example

3.1. Travel Planning Master

APP code:

Really low code! PromptAppGPT, the first natural language development framework based on ChatGPT: fully automatic compilation, operation, and interface generation

Automatically generated APP interface and running results:

Really low code! PromptAppGPT, the first natural language development framework based on ChatGPT: fully automatic compilation, operation, and interface generation

Successfully generated a detailed Hainan travel plan

3.2. Intelligent image generator

APP code: (Contains two steps of using GPT to generate drawing Prompt and using Dalle to draw)

Really low code! PromptAppGPT, the first natural language development framework based on ChatGPT: fully automatic compilation, operation, and interface generation

Using PromptAppGPT can make manual images that originally require two steps Build tasks become automated. At the same time, users do not need to enter cumbersome prompt spells themselves. Users only need to enter the drawing description they care about.

Automatically generated APP interface and running results:

App first uses GPT to generate the Paint Prompt image.

Really low code! PromptAppGPT, the first natural language development framework based on ChatGPT: fully automatic compilation, operation, and interface generation

Then the App automatically calls Dalle to generate the picture based on the drawing prompt output by GPT.

Really low code! PromptAppGPT, the first natural language development framework based on ChatGPT: fully automatic compilation, operation, and interface generation

The following figure shows the final image generation result image.

Really low code! PromptAppGPT, the first natural language development framework based on ChatGPT: fully automatic compilation, operation, and interface generation

GPT helped expand the original simple description "a giant panda" into a lot of detailed English descriptions, such as the panda sitting on the bamboo leaves, in the forest, the panda has a round shape Ears and so on.

These expanded descriptions allow subsequent DALL-E drawings to contain more details and be more vivid.

3.3. Multi-language translation

APP code:

Really low code! PromptAppGPT, the first natural language development framework based on ChatGPT: fully automatic compilation, operation, and interface generation

Automatically generated APP interface and operation results:

Really low code! PromptAppGPT, the first natural language development framework based on ChatGPT: fully automatic compilation, operation, and interface generation

Successfully translated Chinese into English

4. Application development

PromptAppGPT application is developed based on YAML format for low-code development.

The following is a sample application code:

---author: Leoname: 旅游规划大师description: 旅游规划大师gptRound: singlefailedRetries: 2sysTask:userTask: - executor: gptprompt: |我想去 [$i{旅游目的地:@input}] 玩,请你以专业导游的身份,帮我做一份为期 [$i{旅游天数:@select#1/2/3/4/5/6/7}] 天的旅游攻略。另外,我希望整个流程不用太紧凑,我更偏向于安静的地方,可以简单的游玩逛逛。我的预算在 [$i{旅游预算(元):@select#1000/2000/3000/4000/5000/6000/7000}] 元左右。extra:

The author part is the name of the author; the name part is the name of the application; the description part is the description of the application; the gptRound part determines whether to use gpt for single Round (single) or multi-round (multiple) dialogue, for most applications, its value should be single; the failedRetries part sets the number of retries when it fails or the output is invalid.

The sysTask part is a collection of tasks separated by -, which sets the behavior of the executor (gpt). For many applications, this field can be left blank.

The userTask section contains user-defined tasks, separated by -. Each task must define the prompt and executor attributes, while the trigger, output and validator attributes are optional. The application cycles through the user's tasks in order, using the output of the previous task to match each task's trigger. The first task matched by a trigger is the currently running task.

Introduction to the author

Zhang Changwang, senior researcher, member of CCF Theoretical Computer Science and Technology Committee. Served as a member of the Senior Program Committee (SPC) of the 37th AAAI Artificial Intelligence Conference (AAAI-23).

Really low code! PromptAppGPT, the first natural language development framework based on ChatGPT: fully automatic compilation, operation, and interface generation

He received his master's degree and PhD degree from University College London (UCL) in 2011 and 2015, respectively. From 2016 to 2017, he worked in LBS data mining at Alibaba, and from 2018 to 2022, he worked in advertising recommendation and user profiling at Tencent.

The current research direction is the research and application of information retrieval (search promotion), natural language processing, and big data mining.

Reference materials: https://github.com/mleoking/PromptAppGPT

The above is the detailed content of Really low code! PromptAppGPT, the first natural language development framework based on ChatGPT: fully automatic compilation, operation, and interface generation. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:51cto.com. If there is any infringement, please contact admin@php.cn delete