AI prompts
base on 前端低代码框架,通过 JSON 配置就能生成各种页面。 <div align="center">
<p>
<img width="284" src="https://github.com/baidu/amis/raw/master/examples/static/logo.png">
</p>
[文档(国内)](https://aisuda.bce.baidu.com/amis/) |
[文档(国外)](https://baidu.github.io/amis/) |
[可视化编辑器](https://aisuda.github.io/amis-editor-demo/) |
[amis-admin](https://github.com/aisuda/amis-admin) |
[爱速搭](https://aisuda.baidu.com/)
</div>
<div align="center">
如流群:3395342 |
如流群2:5511067|
</div>
<div align="center">
![build](https://img.shields.io/github/actions/workflow/status/baidu/amis/gh-pages.yml)
![license](https://img.shields.io/github/license/baidu/amis.svg)
![version](https://img.shields.io/npm/v/amis)
![language](https://img.shields.io/github/languages/top/baidu/amis)
[![codecov](https://codecov.io/gh/baidu/amis/branch/master/graph/badge.svg?token=9LwimHGoE5)](https://codecov.io/gh/baidu/amis)
![last](https://img.shields.io/github/last-commit/baidu/amis.svg)
</div>
前端低代码框架,通过 JSON 配置就能生成各种后台页面,极大减少开发成本,甚至可以不需要了解前端。
## 开发指南
以下是参与开发 amis 才需要看的,使用请看前面的文档。
> 如果 github 下载慢可以使用 [gitee](https://gitee.com/baidu/amis) 上的镜像。
推荐使用 node 12/14/16。npm 7+, 因为用到了 workspaces 功能。
```bash
# 安装项目 npm 依赖,在 node 12 下会有报错但不影响正常使用。
npm i --legacy-peer-deps
# 启动项目,等编译结束后通过 http://127.0.0.1:8888/examples/pages/simple 访问。
npm start
```
如果是开发编辑器,需要访问 `http://127.0.0.1:8888/packages/amis-editor/`
### 测试
> 注意:本地修改代码后,执行测试用例(`npm test --workspaces`)之前需要先执行`npm run build`完成编译,因为 jest 并不支持 TypeScript
```bash
# 安装依赖
npm i --legacy-peer-deps
# 执行构建
npm run build
# 执行测试用例
npm test --workspaces
# 测试某个用例
# <spec-name>为用例名称,比如inputImage
npm test --workspace amis -- -t <spec-name>
# 运行某个单测文件
./node_modules/.bin/jest packages/amis/__tests__/renderers/Form/buttonToolBar.test.tsx
# 运行某个单测文件里的某个例子
./node_modules/.bin/jest packages/amis/__tests__/renderers/Form/buttonToolBar.test.tsx -t 'Renderer:button-toolbar'
# 查看测试用例覆盖率
npm run coverage
# 更新 snapshot
npm run update-snapshot
# 更新单个 snapshot
# <spec-name>为用例名称,比如inputImage
npm run update-snapshot --workspace amis -- -t <spec-name>
```
### 发布版本
```bash
# 发布内部 registry
npm run publish
# 发布外网环境
# 先通过一下命令设置版本号
npm run version
npm run release
```
### 如何贡献
请使用分支开发,首先创建分支
git checkout -b feat-xxx
开发提交后使用 `git push --set-upstream origin feat-xxx` 创建远程分支。
然后通过系统提示的 https://github.com/xxx/amis/pull/new/feat-xxx 链接来提交 PR。
请采用 typescript 编写,所有合理的改动、新的公用渲染器、用例或者文档的提交都会被接收。
## 贡献者
<a href="https://github.com/baidu/amis/graphs/contributors"><img src="https://opencollective.com/amis/contributors.svg?width=890" /></a>
## 低代码平台
amis 只能实现前端低代码,如果需要完整的低代码平台推荐使用[爱速搭](https://aisuda.baidu.com/)。
", Assign "at most 3 tags" to the expected json: {"id":"3308","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"