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. .
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.
https://www.php.cn/link/fac05328668f599efe18e76cdb284aab
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
APP code:
Automatically generated APP interface and running results:
Successfully generated a detailed Hainan travel plan
APP code: (Contains two steps of using GPT to generate drawing Prompt and using Dalle to draw)
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.
Then the App automatically calls Dalle to generate the picture based on the drawing prompt output by GPT.
The following figure shows the final image generation result image.
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.
APP code:
Automatically generated APP interface and operation results:
Successfully translated Chinese into English
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.
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).
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!