diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index da994f4f..c8806d68 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -45,19 +45,18 @@ body: label: Steps to Reproduce description: Share the steps you took so that we can reproduce the issue. Reports without proper steps details will likely be closed. placeholder: | - 1. Run apinto via the Docker image. - 2. Create a Route with the Admin API. - 3. Try configuring ... - 4. ... + 1. Run APIPark via the Docker image. + 2. Try configuring ... + 3. ... validations: - required: true + required: false - type: textarea id: environment attributes: label: Environment description: Share your environment details. Reports without proper environment details will likely be closed. value: | - - APINTO Dashboard version (run `apinto dashboard version`): + - APINTO Dashboard version: - Operating system (run `uname -a`): validations: required: true \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index d08cecf9..f77ece13 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -1,5 +1,5 @@ name: "Feature Request" -description: Suggest an enhancement to APINTO. +description: Suggest an enhancement to APIPark. title: "feat: As a user, I want to ..., so that ..." body: - type: markdown @@ -20,4 +20,4 @@ body: placeholder: | As a user, I want to ..., so that... validations: - required: true \ No newline at end of file + required: true diff --git a/.github/ISSUE_TEMPLATE/request_help.yml b/.github/ISSUE_TEMPLATE/request_help.yml index 076cbb92..5ffa869a 100644 --- a/.github/ISSUE_TEMPLATE/request_help.yml +++ b/.github/ISSUE_TEMPLATE/request_help.yml @@ -25,7 +25,7 @@ body: label: Environment description: Share your environment details. Reports without proper environment details will likely be closed. value: | - - APIPark version (run `apinto dashboard version`): + - APIPark version: - Operating system (run `uname -a`): validations: required: true \ No newline at end of file diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 040fe3ce..49b80caa 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -25,7 +25,7 @@ jobs: echo "Build frontend..." cd ./frontend && pnpm run build - name: upload frontend release - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: frontend-package path: frontend/dist @@ -41,7 +41,7 @@ jobs: - name: Checkout #Checkout代码 uses: actions/checkout@v3 - name: download frontend release - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: frontend-package path: frontend/dist @@ -71,7 +71,7 @@ jobs: - uses: actions/checkout@v3 - name: download frontend release - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: frontend-package path: frontend/dist diff --git a/.gitignore b/.gitignore index 9b16619e..17943495 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,3 @@ /config.yml /build/ /apipark -/aoplatform diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..df0d9946 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,98 @@ +variables: + PATH: /opt/go-1.21/go/bin/:/opt/node/node/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin + GOROOT: /opt/go-1.21/go + GOPROXY: https://goproxy.cn + VERSION: $CI_COMMIT_SHORT_SHA + APP: apipark + APP_PRE: ${APP}_${VERSION} + BUILD_DIR: ${APP}-build + DEPLOY_DESC: "DEV 环境" + VIEW_ADDR: http://172.18.166.219:8288 + SAVE_DIR: /opt/${APP} + NODE_OPTIONS: --max_old_space_size=8192 + +stages: + - notice + - prefix + - build + - deploy + - webhook + +feishu-informer: # 飞书回调 + stage: notice + variables: + DIFF_URL: "$CI_MERGE_REQUEST_PROJECT_URL/-/merge_requests/$CI_MERGE_REQUEST_IID/diffs" + rules: + - if: $CI_PIPELINE_SOURCE=="merge_request_event" && $CI_COMMIT_BRANCH =~ "main" + script: + - echo "merge request" + - | + curl -X POST -H "Content-Type: application/json" \ + -d "{\"msg_type\":\"text\",\"content\":{\"text\":\"项目:${CI_PROJECT_NAME}\\n提交人:${GITLAB_USER_NAME}\\n提交信息:${CI_MERGE_REQUEST_TITLE}\\n合并分支信息:${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME} -> ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}\\n差异性地址:${DIFF_URL}\\n请及时review代码\"}}" \ + https://open.feishu.cn/open-apis/bot/v2/hook/1c334752-2874-41a1-8f1b-3060f2d46b6c + +prebuild: + stage: prefix + rules: + - if: $CI_COMMIT_BRANCH == "main" + script: + - echo "prebuild" + - chmod +x ./scripts/prefix.sh + - ./scripts/prefix.sh + +builder: + stage: build + rules: + - if: $CI_COMMIT_BRANCH == "main" + script: + - set -e + - | + if [ ! -d "../artifacts" ]; then + mkdir -p ../artifacts + fi + if [ -d "../artifacts/dist" ]; then + cp -r ../artifacts/dist frontend/dist + fi + - | + if [ -n "$(git diff --name-status HEAD~1 HEAD -- frontend)" ]; then + ./scripts/build.sh $BUILD_DIR ${VERSION} all "" + else + ./scripts/build.sh $BUILD_DIR ${VERSION} + fi + if [ -d "frontend/dist" ]; then + echo "copy frontend/dist to artifacts/dist" + rm -fr ../artifacts/dist + cp -r frontend/dist ../artifacts/dist + fi + cp $BUILD_DIR/${APP_PRE}_linux_amd64.tar.gz ${SAVE_DIR} + +deployer: + stage: deploy + rules: + - if: $CI_COMMIT_BRANCH == "main" + variables: + APIPARK_GUEST_MODE: allow + APIPARK_GUEST_ID: dklejrfbhjqwdh + script: + - cd ${SAVE_DIR};mkdir -p ${APP_PRE};tar -zxvf ${APP_PRE}_linux_amd64.tar.gz -C ${APP_PRE};cd ${APP_PRE};./install.sh ${SAVE_DIR};./run.sh restart;cd ${SAVE_DIR} && ./clean.sh ${APP_PRE} + when: on_success +success: + stage: webhook + rules: + - if: $CI_COMMIT_BRANCH == "main" + script: + - | + curl -X POST -H "Content-Type: application/json" \ + -d "{\"msg_type\":\"text\",\"content\":{\"text\":\"最近一次提交:${CI_COMMIT_TITLE}\\n提交人:${GITLAB_USER_NAME}\\n项目:${CI_PROJECT_NAME}\\n环境:${DEPLOY_DESC}\\n更新部署完成.\\n访问地址:${VIEW_ADDR}\\n工作流地址:${CI_PIPELINE_URL}\"}}" \ + https://open.feishu.cn/open-apis/bot/v2/hook/c3672932-4dfa-4989-8023-0128bae59338 + when: on_success +failure: + stage: webhook + rules: + - if: $CI_COMMIT_BRANCH == "main" + script: + - | + curl -X POST -H "Content-Type: application/json" \ + -d "{\"msg_type\":\"text\",\"content\":{\"text\":\"最近一次提交:${CI_COMMIT_TITLE}\\n提交人:${GITLAB_USER_NAME}\\n项目:${CI_PROJECT_NAME}\\n环境:${DEPLOY_DESC}\\n更新部署失败,请及时到gitlab上查看\\n工作流地址:${CI_PIPELINE_URL}\"}}" \ + https://open.feishu.cn/open-apis/bot/v2/hook/c3672932-4dfa-4989-8023-0128bae59338 + when: on_failure diff --git a/README.md b/README.md index 575832f0..f4801f89 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ - +
- English + English | 日本語 | @@ -61,104 +61,94 @@ curl -sSO https://download.apipark.com/install/quick-start.sh ; bash quick-sta
| - Connect to 100+ major models from all mainstream AI Companies + Connect to 100+ AI models | - Standardize all AI API call formats, with no additional adaptation work required + Unified API to use all AI | |
|---|---|---|
-
- The API Service Plaza is one of APIPark’s core features, aiming to solve the problem of fragmented and chaotic internal API management in enterprises. Through the API Service Plaza, enterprises can showcase all API services on a unified platform, allowing different departments and teams to easily find and use the required API services.
+
+ |
+
+
+ |
+ |
| + Transform AI & Prompt to REST API + | ++ API Developer Portal + | + +|
+
+ |
+
+
+ |
+ |
| + High Performance + | ++ Manage API lifecycle + | + +|
+
|
- The full API lifecycle management feature helps enterprises standardize the API management process, manage API traffic forwarding and load balancing, and oversee all API versions published externally. This improves API quality and maintainability, enabling efficient development and stable operation to support rapid business growth and innovation.
- |
- |
| - Combine AI models and prompt templates to form new AI APIs - | -- Switching AI models or modifying prompts won’t affect your APP or microservices - | - -|
-
- The API Service Plaza is one of APIPark’s core features, aiming to solve the problem of fragmented and chaotic internal API management in enterprises. Through the API Service Plaza, enterprises can showcase all API services on a unified platform, allowing different departments and teams to easily find and use the required API services.
- |
-
-
- The full API lifecycle management feature helps enterprises standardize the API management process, manage API traffic forwarding and load balancing, and oversee all API versions published externally. This improves API quality and maintainability, enabling efficient development and stable operation to support rapid business growth and innovation.
- |
- |
| - Centrally manage and display all AI / REST APIs - | -- Cover the entire API lifecycle from design, release, operation, to deprecation - | - -|
-
- The API Service Plaza is one of APIPark’s core features, aiming to solve the problem of fragmented and chaotic internal API management in enterprises. Through the API Service Plaza, enterprises can showcase all API services on a unified platform, allowing different departments and teams to easily find and use the required API services.
- |
-
-
- The full API lifecycle management feature helps enterprises standardize the API management process, manage API traffic forwarding and load balancing, and oversee all API versions published externally. This improves API quality and maintainability, enabling efficient development and stable operation to support rapid business growth and innovation.
|
|
| - Manage multiple tenants, ensuring data isolation and security + Review subscription before allowing API requests | - API resources require approval before usage + Manage subscriber | |
-
- The multi-tenant management feature allows enterprises to manage multiple tenants on the same platform. Each tenant can have independent resources, users, and permission settings, ensuring data and operation isolation, improving resource utilization efficiency, and simplifying management.
- |
- APIPark provides a process approval feature for all API resources, preventing violations or unauthorized API usage. Callers must apply for API resources and wait for the service provider's approval before officially using the API.
+ |
+
+
|
| - Use detailed call logs to trace API access at any time + Logging | - Comprehensive statistical reports* + Analysis | |
- The API call log feature provides enterprises with comprehensive logging capabilities, recording all relevant information for each API call. These logs allow enterprises to quickly trace and troubleshoot API call issues, ensuring system stability and data security.
|
- Through historical call data analysis, APIPark can display long-term API call trends and performance changes, helping enterprises perform preventative maintenance before problems arise.
|