diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index d5b0dce309..fcafbce798 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,56 +1,56 @@ name: "🕷️ Bug report" description: Report errors or unexpected behavior labels: -- bug + - bug body: -- type: checkboxes - attributes: - label: Self Checks - description: "To make sure we get to you in time, please check the following :)" - options: - - label: I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - required: true - - label: I confirm that I am using English to file this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - required: true + - type: checkboxes + attributes: + label: Self Checks + description: "To make sure we get to you in time, please check the following :)" + options: + - label: I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. + required: true + - label: I confirm that I am using English to file this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). + required: true -- type: input - attributes: - label: Dify version - placeholder: 0.3.21 - description: See about section in Dify console - validations: - required: true + - type: input + attributes: + label: Dify version + placeholder: 0.3.21 + description: See about section in Dify console + validations: + required: true -- type: dropdown - attributes: - label: Cloud or Self Hosted - description: How / Where was Dify installed from? - multiple: true - options: - - Cloud - - Self Hosted (Docker) - - Self Hosted (Source) - validations: - required: true + - type: dropdown + attributes: + label: Cloud or Self Hosted + description: How / Where was Dify installed from? + multiple: true + options: + - Cloud + - Self Hosted (Docker) + - Self Hosted (Source) + validations: + required: true -- type: textarea - attributes: - label: Steps to reproduce - description: We highly suggest including screenshots and a bug report log. - placeholder: Having detailed steps helps us reproduce the bug. - validations: - required: true + - type: textarea + attributes: + label: Steps to reproduce + description: We highly suggest including screenshots and a bug report log. + placeholder: Having detailed steps helps us reproduce the bug. + validations: + required: true -- type: textarea - attributes: - label: ✔️ Expected Behavior - placeholder: What were you expecting? - validations: - required: false + - type: textarea + attributes: + label: ✔️ Expected Behavior + placeholder: What were you expecting? + validations: + required: false -- type: textarea - attributes: - label: ❌ Actual Behavior - placeholder: What happened instead? - validations: - required: false + - type: textarea + attributes: + label: ❌ Actual Behavior + placeholder: What happened instead? + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index effd93c8dd..004214531d 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -5,4 +5,4 @@ contact_links: about: Documentation for users of Dify - name: "\U0001F4DA Dify dev documentation" url: https://docs.dify.ai/getting-started/install-self-hosted - about: Documentation for people interested in developing and contributing for Dify \ No newline at end of file + about: Documentation for people interested in developing and contributing for Dify diff --git a/.github/ISSUE_TEMPLATE/document_issue.yml b/.github/ISSUE_TEMPLATE/document_issue.yml index c4e8bcc4aa..750bc3501a 100644 --- a/.github/ISSUE_TEMPLATE/document_issue.yml +++ b/.github/ISSUE_TEMPLATE/document_issue.yml @@ -1,20 +1,20 @@ name: "📚 Documentation Issue" description: Report issues in our documentation -labels: -- ducumentation +labels: + - ducumentation body: -- type: checkboxes - attributes: - label: Self Checks - description: "To make sure we get to you in time, please check the following :)" - options: - - label: I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - required: true - - label: I confirm that I am using English to file this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - required: true -- type: textarea - attributes: - label: Provide a description of requested docs changes - placeholder: Briefly describe which document needs to be corrected and why. - validations: - required: true \ No newline at end of file + - type: checkboxes + attributes: + label: Self Checks + description: "To make sure we get to you in time, please check the following :)" + options: + - label: I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. + required: true + - label: I confirm that I am using English to file this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). + required: true + - type: textarea + attributes: + label: Provide a description of requested docs changes + placeholder: Briefly describe which document needs to be corrected and why. + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index b66b6f542d..343c675e5f 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -1,35 +1,35 @@ name: "⭐ Feature or enhancement request" description: Propose something new. labels: -- enhancement + - enhancement body: -- type: checkboxes - attributes: - label: Self Checks - description: "To make sure we get to you in time, please check the following :)" - options: - - label: I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - required: true - - label: I confirm that I am using English to file this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - required: true -- type: textarea - attributes: - label: Description of the new feature / enhancement - placeholder: What is the expected behavior of the proposed feature? - validations: - required: true -- type: textarea - attributes: - label: Scenario when this would be used? - placeholder: What is the scenario this would be used? Why is this important to your workflow as a dify user? - validations: - required: true -- type: textarea - attributes: - label: Supporting information - placeholder: "Having additional evidence, data, tweets, blog posts, research, ... anything is extremely helpful. This information provides context to the scenario that may otherwise be lost." - validations: - required: false -- type: markdown - attributes: - value: Please limit one request per issue. \ No newline at end of file + - type: checkboxes + attributes: + label: Self Checks + description: "To make sure we get to you in time, please check the following :)" + options: + - label: I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. + required: true + - label: I confirm that I am using English to file this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). + required: true + - type: textarea + attributes: + label: Description of the new feature / enhancement + placeholder: What is the expected behavior of the proposed feature? + validations: + required: true + - type: textarea + attributes: + label: Scenario when this would be used? + placeholder: What is the scenario this would be used? Why is this important to your workflow as a dify user? + validations: + required: true + - type: textarea + attributes: + label: Supporting information + placeholder: "Having additional evidence, data, tweets, blog posts, research, ... anything is extremely helpful. This information provides context to the scenario that may otherwise be lost." + validations: + required: false + - type: markdown + attributes: + value: Please limit one request per issue. diff --git a/.github/ISSUE_TEMPLATE/help_wanted.yml b/.github/ISSUE_TEMPLATE/help_wanted.yml index 1b4f08808a..88ffae7f09 100644 --- a/.github/ISSUE_TEMPLATE/help_wanted.yml +++ b/.github/ISSUE_TEMPLATE/help_wanted.yml @@ -1,20 +1,20 @@ name: "🤝 Help Wanted" description: "Request help from the community [please use English :)]" labels: -- help-wanted + - help-wanted body: -- type: checkboxes - attributes: - label: Self Checks - description: "To make sure we get to you in time, please check the following :)" - options: - - label: I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - required: true - - label: I confirm that I am using English to file this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - required: true -- type: textarea - attributes: - label: Provide a description of the help you need - placeholder: Briefly describe what you need help with. - validations: - required: true \ No newline at end of file + - type: checkboxes + attributes: + label: Self Checks + description: "To make sure we get to you in time, please check the following :)" + options: + - label: I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. + required: true + - label: I confirm that I am using English to file this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). + required: true + - type: textarea + attributes: + label: Provide a description of the help you need + placeholder: Briefly describe what you need help with. + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/translation_issue.yml b/.github/ISSUE_TEMPLATE/translation_issue.yml index eca5c0f5bb..aa6d077c61 100644 --- a/.github/ISSUE_TEMPLATE/translation_issue.yml +++ b/.github/ISSUE_TEMPLATE/translation_issue.yml @@ -1,52 +1,52 @@ name: "🌐 Localization/Translation issue" description: Report incorrect translations. [please use English :)] labels: -- translation + - translation body: -- type: checkboxes - attributes: - label: Self Checks - description: "To make sure we get to you in time, please check the following :)" - options: - - label: I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - required: true - - label: I confirm that I am using English to file this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - required: true -- type: input - attributes: - label: Dify version - placeholder: 0.3.21 - description: Hover over system tray icon or look at Settings - validations: - required: true -- type: input - attributes: - label: Utility with translation issue - placeholder: Some area - description: Please input here the utility with the translation issue - validations: - required: true -- type: input - attributes: - label: 🌐 Language affected - placeholder: "German" - validations: - required: true -- type: textarea - attributes: - label: ❌ Actual phrase(s) - placeholder: What is there? Please include a screenshot as that is extremely helpful. - validations: - required: true -- type: textarea - attributes: - label: ✔️ Expected phrase(s) - placeholder: What was expected? - validations: - required: true -- type: textarea - attributes: - label: ℹ Why is the current translation wrong - placeholder: Why do you feel this is incorrect? - validations: - required: true \ No newline at end of file + - type: checkboxes + attributes: + label: Self Checks + description: "To make sure we get to you in time, please check the following :)" + options: + - label: I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. + required: true + - label: I confirm that I am using English to file this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). + required: true + - type: input + attributes: + label: Dify version + placeholder: 0.3.21 + description: Hover over system tray icon or look at Settings + validations: + required: true + - type: input + attributes: + label: Utility with translation issue + placeholder: Some area + description: Please input here the utility with the translation issue + validations: + required: true + - type: input + attributes: + label: 🌐 Language affected + placeholder: "German" + validations: + required: true + - type: textarea + attributes: + label: ❌ Actual phrase(s) + placeholder: What is there? Please include a screenshot as that is extremely helpful. + validations: + required: true + - type: textarea + attributes: + label: ✔️ Expected phrase(s) + placeholder: What was expected? + validations: + required: true + - type: textarea + attributes: + label: ℹ Why is the current translation wrong + placeholder: Why do you feel this is incorrect? + validations: + required: true diff --git a/.github/linters/.hadolint.yaml b/.github/linters/.hadolint.yaml index 27c522cc48..a607204b13 100644 --- a/.github/linters/.hadolint.yaml +++ b/.github/linters/.hadolint.yaml @@ -1 +1 @@ -failure-threshold: "error" \ No newline at end of file +failure-threshold: "error" diff --git a/.github/linters/.yaml-lint.yml b/.github/linters/.yaml-lint.yml index a169f02c7d..c886e67b6a 100644 --- a/.github/linters/.yaml-lint.yml +++ b/.github/linters/.yaml-lint.yml @@ -5,11 +5,7 @@ extends: default rules: brackets: max-spaces-inside: 1 + comments-indentation: disable document-start: disable - indentation: - level: warning line-length: disable - new-line-at-end-of-file: - level: warning - trailing-spaces: - level: warning + truthy: disable diff --git a/.github/workflows/api-model-runtime-tests.yml b/.github/workflows/api-model-runtime-tests.yml index 640894f2a1..c2bd992f66 100644 --- a/.github/workflows/api-model-runtime-tests.yml +++ b/.github/workflows/api-model-runtime-tests.yml @@ -32,18 +32,18 @@ jobs: MOCK_SWITCH: true steps: - - name: Checkout code - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.10' - cache: 'pip' - cache-dependency-path: ./api/requirements.txt + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + cache: 'pip' + cache-dependency-path: ./api/requirements.txt - - name: Install dependencies - run: pip install -r ./api/requirements.txt + - name: Install dependencies + run: pip install -r ./api/requirements.txt - - name: Run pytest - run: pytest api/tests/integration_tests/model_runtime/anthropic api/tests/integration_tests/model_runtime/azure_openai api/tests/integration_tests/model_runtime/openai api/tests/integration_tests/model_runtime/chatglm api/tests/integration_tests/model_runtime/google api/tests/integration_tests/model_runtime/xinference api/tests/integration_tests/model_runtime/huggingface_hub/test_llm.py + - name: Run pytest + run: pytest api/tests/integration_tests/model_runtime/anthropic api/tests/integration_tests/model_runtime/azure_openai api/tests/integration_tests/model_runtime/openai api/tests/integration_tests/model_runtime/chatglm api/tests/integration_tests/model_runtime/google api/tests/integration_tests/model_runtime/xinference api/tests/integration_tests/model_runtime/huggingface_hub/test_llm.py diff --git a/.github/workflows/build-api-image.yml b/.github/workflows/build-api-image.yml index dfb4ec1847..0eb9e95b61 100644 --- a/.github/workflows/build-api-image.yml +++ b/.github/workflows/build-api-image.yml @@ -6,55 +6,55 @@ on: - 'main' - 'deploy/dev' release: - types: [published] + types: [ published ] jobs: build-and-push: runs-on: ubuntu-latest if: github.event.pull_request.draft == false steps: - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - - name: Login to Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USER }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USER }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v5 - with: - images: langgenius/dify-api - tags: | - type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }} - type=ref,event=branch - type=sha,enable=true,priority=100,prefix=,suffix=,format=long - type=raw,value=${{ github.ref_name }},enable=${{ startsWith(github.ref, 'refs/tags/') }} + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: langgenius/dify-api + tags: | + type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }} + type=ref,event=branch + type=sha,enable=true,priority=100,prefix=,suffix=,format=long + type=raw,value=${{ github.ref_name }},enable=${{ startsWith(github.ref, 'refs/tags/') }} - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: "{{defaultContext}}:api" - platforms: ${{ startsWith(github.ref, 'refs/tags/') && 'linux/amd64,linux/arm64' || 'linux/amd64' }} - build-args: | - COMMIT_SHA=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }} - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: "{{defaultContext}}:api" + platforms: ${{ startsWith(github.ref, 'refs/tags/') && 'linux/amd64,linux/arm64' || 'linux/amd64' }} + build-args: | + COMMIT_SHA=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }} + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max - - name: Deploy to server - if: github.ref == 'refs/heads/deploy/dev' - uses: appleboy/ssh-action@v0.1.8 - with: - host: ${{ secrets.SSH_HOST }} - username: ${{ secrets.SSH_USER }} - key: ${{ secrets.SSH_PRIVATE_KEY }} - script: | - ${{ secrets.SSH_SCRIPT }} + - name: Deploy to server + if: github.ref == 'refs/heads/deploy/dev' + uses: appleboy/ssh-action@v0.1.8 + with: + host: ${{ secrets.SSH_HOST }} + username: ${{ secrets.SSH_USER }} + key: ${{ secrets.SSH_PRIVATE_KEY }} + script: | + ${{ secrets.SSH_SCRIPT }} diff --git a/.github/workflows/build-web-image.yml b/.github/workflows/build-web-image.yml index e6541ed506..b77167c2a3 100644 --- a/.github/workflows/build-web-image.yml +++ b/.github/workflows/build-web-image.yml @@ -6,55 +6,55 @@ on: - 'main' - 'deploy/dev' release: - types: [published] + types: [ published ] jobs: build-and-push: runs-on: ubuntu-latest if: github.event.pull_request.draft == false steps: - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - - name: Login to Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USER }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USER }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v5 - with: - images: langgenius/dify-web - tags: | - type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }} - type=ref,event=branch - type=sha,enable=true,priority=100,prefix=,suffix=,format=long - type=raw,value=${{ github.ref_name }},enable=${{ startsWith(github.ref, 'refs/tags/') }} + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: langgenius/dify-web + tags: | + type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }} + type=ref,event=branch + type=sha,enable=true,priority=100,prefix=,suffix=,format=long + type=raw,value=${{ github.ref_name }},enable=${{ startsWith(github.ref, 'refs/tags/') }} - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: "{{defaultContext}}:web" - platforms: ${{ startsWith(github.ref, 'refs/tags/') && 'linux/amd64,linux/arm64' || 'linux/amd64' }} - build-args: | - COMMIT_SHA=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }} - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: "{{defaultContext}}:web" + platforms: ${{ startsWith(github.ref, 'refs/tags/') && 'linux/amd64,linux/arm64' || 'linux/amd64' }} + build-args: | + COMMIT_SHA=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }} + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max - - name: Deploy to server - if: github.ref == 'refs/heads/deploy/dev' - uses: appleboy/ssh-action@v0.1.8 - with: - host: ${{ secrets.SSH_HOST }} - username: ${{ secrets.SSH_USER }} - key: ${{ secrets.SSH_PRIVATE_KEY }} - script: | - ${{ secrets.SSH_SCRIPT }} + - name: Deploy to server + if: github.ref == 'refs/heads/deploy/dev' + uses: appleboy/ssh-action@v0.1.8 + with: + host: ${{ secrets.SSH_HOST }} + username: ${{ secrets.SSH_USER }} + key: ${{ secrets.SSH_PRIVATE_KEY }} + script: | + ${{ secrets.SSH_SCRIPT }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index b3bd0b165b..1870b1f670 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -7,7 +7,7 @@ name: Mark stale issues and pull requests on: schedule: - - cron: '0 3 * * *' + - cron: '0 3 * * *' jobs: stale: @@ -18,13 +18,13 @@ jobs: pull-requests: write steps: - - uses: actions/stale@v5 - with: - days-before-issue-stale: 15 - days-before-issue-close: 3 - repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-issue-message: "Close due to it's no longer active, if you have any questions, you can reopen it." - stale-pr-message: "Close due to it's no longer active, if you have any questions, you can reopen it." - stale-issue-label: 'no-issue-activity' - stale-pr-label: 'no-pr-activity' - any-of-labels: 'duplicate,question,invalid,wontfix,no-issue-activity,no-pr-activity,enhancement,cant-reproduce,help-wanted' + - uses: actions/stale@v5 + with: + days-before-issue-stale: 15 + days-before-issue-close: 3 + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: "Close due to it's no longer active, if you have any questions, you can reopen it." + stale-pr-message: "Close due to it's no longer active, if you have any questions, you can reopen it." + stale-issue-label: 'no-issue-activity' + stale-pr-label: 'no-pr-activity' + any-of-labels: 'duplicate,question,invalid,wontfix,no-issue-activity,no-pr-activity,enhancement,cant-reproduce,help-wanted' diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 505f65660b..926ea40b74 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -18,37 +18,37 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v4 - - name: Setup NodeJS - uses: actions/setup-node@v4 - with: - node-version: 18 - cache: yarn - cache-dependency-path: ./web/package.json + - name: Setup NodeJS + uses: actions/setup-node@v4 + with: + node-version: 18 + cache: yarn + cache-dependency-path: ./web/package.json - - name: Web dependencies - run: | - cd ./web - yarn install --frozen-lockfile + - name: Web dependencies + run: | + cd ./web + yarn install --frozen-lockfile - - name: Web style check - run: | - cd ./web - yarn run lint + - name: Web style check + run: | + cd ./web + yarn run lint - - name: Super-linter - uses: super-linter/super-linter/slim@v5 - env: - BASH_SEVERITY: warning - DEFAULT_BRANCH: main - ERROR_ON_MISSING_EXEC_BIT: true - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - IGNORE_GENERATED_FILES: true - IGNORE_GITIGNORED_FILES: true - VALIDATE_BASH: true - VALIDATE_BASH_EXEC: true - VALIDATE_GITHUB_ACTIONS: true - VALIDATE_DOCKERFILE_HADOLINT: true - VALIDATE_YAML: true + - name: Super-linter + uses: super-linter/super-linter/slim@v5 + env: + BASH_SEVERITY: warning + DEFAULT_BRANCH: main + ERROR_ON_MISSING_EXEC_BIT: true + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + IGNORE_GENERATED_FILES: true + IGNORE_GITIGNORED_FILES: true + VALIDATE_BASH: true + VALIDATE_BASH_EXEC: true + VALIDATE_GITHUB_ACTIONS: true + VALIDATE_DOCKERFILE_HADOLINT: true + VALIDATE_YAML: true diff --git a/api/core/model_runtime/model_providers/_position.yaml b/api/core/model_runtime/model_providers/_position.yaml index 6253498b21..bf1d7f2d42 100644 --- a/api/core/model_runtime/model_providers/_position.yaml +++ b/api/core/model_runtime/model_providers/_position.yaml @@ -17,4 +17,4 @@ - xinference - openllm - localai -- openai_api_compatible \ No newline at end of file +- openai_api_compatible diff --git a/api/core/model_runtime/model_providers/anthropic/anthropic.yaml b/api/core/model_runtime/model_providers/anthropic/anthropic.yaml index f704535162..d32b763301 100644 --- a/api/core/model_runtime/model_providers/anthropic/anthropic.yaml +++ b/api/core/model_runtime/model_providers/anthropic/anthropic.yaml @@ -16,24 +16,24 @@ help: url: en_US: https://console.anthropic.com/account/keys supported_model_types: -- llm + - llm configurate_methods: -- predefined-model + - predefined-model provider_credential_schema: credential_form_schemas: - - variable: anthropic_api_key - label: - en_US: API Key - type: secret-input - required: true - placeholder: - zh_Hans: 在此输入您的 API Key - en_US: Enter your API Key - - variable: anthropic_api_url - label: - en_US: API URL - type: text-input - required: false - placeholder: - zh_Hans: 在此输入您的 API URL - en_US: Enter your API URL + - variable: anthropic_api_key + label: + en_US: API Key + type: secret-input + required: true + placeholder: + zh_Hans: 在此输入您的 API Key + en_US: Enter your API Key + - variable: anthropic_api_url + label: + en_US: API URL + type: text-input + required: false + placeholder: + zh_Hans: 在此输入您的 API URL + en_US: Enter your API URL diff --git a/api/core/model_runtime/model_providers/anthropic/llm/claude-2.1.yaml b/api/core/model_runtime/model_providers/anthropic/llm/claude-2.1.yaml index 51a0ab9d88..08beef3caa 100644 --- a/api/core/model_runtime/model_providers/anthropic/llm/claude-2.1.yaml +++ b/api/core/model_runtime/model_providers/anthropic/llm/claude-2.1.yaml @@ -3,32 +3,32 @@ label: en_US: claude-2.1 model_type: llm features: -- agent-thought + - agent-thought model_properties: mode: chat context_size: 200000 parameter_rules: -- name: temperature - use_template: temperature -- name: top_p - use_template: top_p -- name: top_k - label: - zh_Hans: 取样数量 - en_US: Top k - type: int - help: - zh_Hans: 仅从每个后续标记的前 K 个选项中采样。 - en_US: Only sample from the top K options for each subsequent token. - required: false -- name: max_tokens_to_sample - use_template: max_tokens - required: true - default: 4096 - min: 1 - max: 4096 + - name: temperature + use_template: temperature + - name: top_p + use_template: top_p + - name: top_k + label: + zh_Hans: 取样数量 + en_US: Top k + type: int + help: + zh_Hans: 仅从每个后续标记的前 K 个选项中采样。 + en_US: Only sample from the top K options for each subsequent token. + required: false + - name: max_tokens_to_sample + use_template: max_tokens + required: true + default: 4096 + min: 1 + max: 4096 pricing: input: '8.00' output: '24.00' unit: '0.000001' - currency: USD \ No newline at end of file + currency: USD diff --git a/api/core/model_runtime/model_providers/anthropic/llm/claude-2.yaml b/api/core/model_runtime/model_providers/anthropic/llm/claude-2.yaml index b9f45c7d16..3c49067630 100644 --- a/api/core/model_runtime/model_providers/anthropic/llm/claude-2.yaml +++ b/api/core/model_runtime/model_providers/anthropic/llm/claude-2.yaml @@ -3,32 +3,32 @@ label: en_US: claude-2 model_type: llm features: -- agent-thought + - agent-thought model_properties: mode: chat context_size: 100000 parameter_rules: -- name: temperature - use_template: temperature -- name: top_p - use_template: top_p -- name: top_k - label: - zh_Hans: 取样数量 - en_US: Top k - type: int - help: - zh_Hans: 仅从每个后续标记的前 K 个选项中采样。 - en_US: Only sample from the top K options for each subsequent token. - required: false -- name: max_tokens_to_sample - use_template: max_tokens - required: true - default: 4096 - min: 1 - max: 4096 + - name: temperature + use_template: temperature + - name: top_p + use_template: top_p + - name: top_k + label: + zh_Hans: 取样数量 + en_US: Top k + type: int + help: + zh_Hans: 仅从每个后续标记的前 K 个选项中采样。 + en_US: Only sample from the top K options for each subsequent token. + required: false + - name: max_tokens_to_sample + use_template: max_tokens + required: true + default: 4096 + min: 1 + max: 4096 pricing: input: '8.00' output: '24.00' unit: '0.000001' - currency: USD \ No newline at end of file + currency: USD diff --git a/api/core/model_runtime/model_providers/anthropic/llm/claude-instant-1.yaml b/api/core/model_runtime/model_providers/anthropic/llm/claude-instant-1.yaml index 5f2224f845..d44859faa3 100644 --- a/api/core/model_runtime/model_providers/anthropic/llm/claude-instant-1.yaml +++ b/api/core/model_runtime/model_providers/anthropic/llm/claude-instant-1.yaml @@ -2,32 +2,32 @@ model: claude-instant-1 label: en_US: claude-instant-1 model_type: llm -features: [] +features: [ ] model_properties: mode: chat context_size: 100000 parameter_rules: -- name: temperature - use_template: temperature -- name: top_p - use_template: top_p -- name: top_k - label: - zh_Hans: 取样数量 - en_US: Top k - type: int - help: - zh_Hans: 仅从每个后续标记的前 K 个选项中采样。 - en_US: Only sample from the top K options for each subsequent token. - required: false -- name: max_tokens_to_sample - use_template: max_tokens - required: true - default: 4096 - min: 1 - max: 4096 + - name: temperature + use_template: temperature + - name: top_p + use_template: top_p + - name: top_k + label: + zh_Hans: 取样数量 + en_US: Top k + type: int + help: + zh_Hans: 仅从每个后续标记的前 K 个选项中采样。 + en_US: Only sample from the top K options for each subsequent token. + required: false + - name: max_tokens_to_sample + use_template: max_tokens + required: true + default: 4096 + min: 1 + max: 4096 pricing: input: '1.63' output: '5.51' unit: '0.000001' - currency: USD \ No newline at end of file + currency: USD diff --git a/api/core/model_runtime/model_providers/azure_openai/azure_openai.yaml b/api/core/model_runtime/model_providers/azure_openai/azure_openai.yaml index 734936be68..c081808639 100644 --- a/api/core/model_runtime/model_providers/azure_openai/azure_openai.yaml +++ b/api/core/model_runtime/model_providers/azure_openai/azure_openai.yaml @@ -13,10 +13,10 @@ help: url: en_US: https://azure.microsoft.com/en-us/products/ai-services/openai-service supported_model_types: -- llm -- text-embedding + - llm + - text-embedding configurate_methods: -- customizable-model + - customizable-model model_credential_schema: model: label: @@ -26,79 +26,79 @@ model_credential_schema: en_US: Enter your Deployment Name here, matching the Azure deployment name. zh_Hans: 在此输入您的部署名称,与 Azure 部署名称匹配。 credential_form_schemas: - - variable: openai_api_base - label: - en_US: API Endpoint URL - zh_Hans: API 域名 - type: text-input - required: true - placeholder: - zh_Hans: '在此输入您的 API 域名,如:https://example.com/xxx' - en_US: 'Enter your API Endpoint, eg: https://example.com/xxx' - - variable: openai_api_key - label: - en_US: API Key - zh_Hans: API Key - type: secret-input - required: true - placeholder: - zh_Hans: 在此输入您的 API Key - en_US: Enter your API key here - - variable: base_model_name - label: - en_US: Base Model - zh_Hans: 基础模型 - type: select - required: true - options: - - label: - en_US: gpt-35-turbo - value: gpt-35-turbo - show_on: - - variable: __model_type - value: llm - - label: - en_US: gpt-35-turbo-16k - value: gpt-35-turbo-16k - show_on: - - variable: __model_type - value: llm - - label: - en_US: gpt-4 - value: gpt-4 - show_on: - - variable: __model_type - value: llm - - label: - en_US: gpt-4-32k - value: gpt-4-32k - show_on: - - variable: __model_type - value: llm - - label: - en_US: gpt-4-1106-preview - value: gpt-4-1106-preview - show_on: - - variable: __model_type - value: llm - - label: - en_US: gpt-4-vision-preview - value: gpt-4-vision-preview - show_on: - - variable: __model_type - value: llm - - label: - en_US: gpt-35-turbo-instruct - value: gpt-35-turbo-instruct - show_on: - - variable: __model_type - value: llm - - label: - en_US: text-embedding-ada-002 - value: text-embedding-ada-002 - show_on: - - variable: __model_type - value: text-embedding - placeholder: - zh_Hans: 在此输入您的模型版本 - en_US: Enter your model version \ No newline at end of file + - variable: openai_api_base + label: + en_US: API Endpoint URL + zh_Hans: API 域名 + type: text-input + required: true + placeholder: + zh_Hans: '在此输入您的 API 域名,如:https://example.com/xxx' + en_US: 'Enter your API Endpoint, eg: https://example.com/xxx' + - variable: openai_api_key + label: + en_US: API Key + zh_Hans: API Key + type: secret-input + required: true + placeholder: + zh_Hans: 在此输入您的 API Key + en_US: Enter your API key here + - variable: base_model_name + label: + en_US: Base Model + zh_Hans: 基础模型 + type: select + required: true + options: + - label: + en_US: gpt-35-turbo + value: gpt-35-turbo + show_on: + - variable: __model_type + value: llm + - label: + en_US: gpt-35-turbo-16k + value: gpt-35-turbo-16k + show_on: + - variable: __model_type + value: llm + - label: + en_US: gpt-4 + value: gpt-4 + show_on: + - variable: __model_type + value: llm + - label: + en_US: gpt-4-32k + value: gpt-4-32k + show_on: + - variable: __model_type + value: llm + - label: + en_US: gpt-4-1106-preview + value: gpt-4-1106-preview + show_on: + - variable: __model_type + value: llm + - label: + en_US: gpt-4-vision-preview + value: gpt-4-vision-preview + show_on: + - variable: __model_type + value: llm + - label: + en_US: gpt-35-turbo-instruct + value: gpt-35-turbo-instruct + show_on: + - variable: __model_type + value: llm + - label: + en_US: text-embedding-ada-002 + value: text-embedding-ada-002 + show_on: + - variable: __model_type + value: text-embedding + placeholder: + zh_Hans: 在此输入您的模型版本 + en_US: Enter your model version diff --git a/api/core/model_runtime/model_providers/baichuan/baichuan.yaml b/api/core/model_runtime/model_providers/baichuan/baichuan.yaml index 1dea66c7fd..792126af7f 100644 --- a/api/core/model_runtime/model_providers/baichuan/baichuan.yaml +++ b/api/core/model_runtime/model_providers/baichuan/baichuan.yaml @@ -8,30 +8,30 @@ icon_large: background: "#FFF6F2" help: title: - en_US: Get your API Key from BAICHUAN AI + en_US: Get your API Key from BAICHUAN AI zh_Hans: 从百川智能获取您的 API Key url: en_US: https://www.baichuan-ai.com supported_model_types: -- llm -- text-embedding + - llm + - text-embedding configurate_methods: -- predefined-model + - predefined-model provider_credential_schema: credential_form_schemas: - - variable: api_key - label: - en_US: API Key - type: secret-input - required: true - placeholder: - zh_Hans: 在此输入您的 API Key - en_US: Enter your API Key - - variable: secret_key - label: - en_US: Secret Key - type: secret-input - required: false - placeholder: - zh_Hans: 在此输入您的 Secret Key - en_US: Enter your Secret Key + - variable: api_key + label: + en_US: API Key + type: secret-input + required: true + placeholder: + zh_Hans: 在此输入您的 API Key + en_US: Enter your API Key + - variable: secret_key + label: + en_US: Secret Key + type: secret-input + required: false + placeholder: + zh_Hans: 在此输入您的 Secret Key + en_US: Enter your Secret Key diff --git a/api/core/model_runtime/model_providers/baichuan/llm/baichuan2-53b.yaml b/api/core/model_runtime/model_providers/baichuan/llm/baichuan2-53b.yaml index 57a433a058..27a7b487c9 100644 --- a/api/core/model_runtime/model_providers/baichuan/llm/baichuan2-53b.yaml +++ b/api/core/model_runtime/model_providers/baichuan/llm/baichuan2-53b.yaml @@ -3,40 +3,40 @@ label: en_US: Baichuan2-53B model_type: llm features: -- agent-thought + - agent-thought model_properties: mode: chat context_size: 4000 parameter_rules: -- name: temperature - use_template: temperature -- name: top_p - use_template: top_p -- name: top_k - label: - zh_Hans: 取样数量 - en_US: Top k - type: int - help: - zh_Hans: 仅从每个后续标记的前 K 个选项中采样。 - en_US: Only sample from the top K options for each subsequent token. - required: false -- name: max_tokens - use_template: max_tokens - required: true - default: 1000 - min: 1 - max: 4000 -- name: presence_penalty - use_template: presence_penalty -- name: frequency_penalty - use_template: frequency_penalty -- name: with_search_enhance - label: - zh_Hans: 搜索增强 - en_US: Search Enhance - type: boolean - help: - zh_Hans: 允许模型自行进行外部搜索,以增强生成结果。 - en_US: Allow the model to perform external search to enhance the generation results. - required: false \ No newline at end of file + - name: temperature + use_template: temperature + - name: top_p + use_template: top_p + - name: top_k + label: + zh_Hans: 取样数量 + en_US: Top k + type: int + help: + zh_Hans: 仅从每个后续标记的前 K 个选项中采样。 + en_US: Only sample from the top K options for each subsequent token. + required: false + - name: max_tokens + use_template: max_tokens + required: true + default: 1000 + min: 1 + max: 4000 + - name: presence_penalty + use_template: presence_penalty + - name: frequency_penalty + use_template: frequency_penalty + - name: with_search_enhance + label: + zh_Hans: 搜索增强 + en_US: Search Enhance + type: boolean + help: + zh_Hans: 允许模型自行进行外部搜索,以增强生成结果。 + en_US: Allow the model to perform external search to enhance the generation results. + required: false diff --git a/api/core/model_runtime/model_providers/baichuan/llm/baichuan2-turbo-192k.yaml b/api/core/model_runtime/model_providers/baichuan/llm/baichuan2-turbo-192k.yaml index 5818c51f95..34fee89ba1 100644 --- a/api/core/model_runtime/model_providers/baichuan/llm/baichuan2-turbo-192k.yaml +++ b/api/core/model_runtime/model_providers/baichuan/llm/baichuan2-turbo-192k.yaml @@ -3,40 +3,40 @@ label: en_US: Baichuan2-Turbo-192K model_type: llm features: -- agent-thought + - agent-thought model_properties: mode: chat context_size: 192000 parameter_rules: -- name: temperature - use_template: temperature -- name: top_p - use_template: top_p -- name: top_k - label: - zh_Hans: 取样数量 - en_US: Top k - type: int - help: - zh_Hans: 仅从每个后续标记的前 K 个选项中采样。 - en_US: Only sample from the top K options for each subsequent token. - required: false -- name: max_tokens - use_template: max_tokens - required: true - default: 8000 - min: 1 - max: 192000 -- name: presence_penalty - use_template: presence_penalty -- name: frequency_penalty - use_template: frequency_penalty -- name: with_search_enhance - label: - zh_Hans: 搜索增强 - en_US: Search Enhance - type: boolean - help: - zh_Hans: 允许模型自行进行外部搜索,以增强生成结果。 - en_US: Allow the model to perform external search to enhance the generation results. - required: false \ No newline at end of file + - name: temperature + use_template: temperature + - name: top_p + use_template: top_p + - name: top_k + label: + zh_Hans: 取样数量 + en_US: Top k + type: int + help: + zh_Hans: 仅从每个后续标记的前 K 个选项中采样。 + en_US: Only sample from the top K options for each subsequent token. + required: false + - name: max_tokens + use_template: max_tokens + required: true + default: 8000 + min: 1 + max: 192000 + - name: presence_penalty + use_template: presence_penalty + - name: frequency_penalty + use_template: frequency_penalty + - name: with_search_enhance + label: + zh_Hans: 搜索增强 + en_US: Search Enhance + type: boolean + help: + zh_Hans: 允许模型自行进行外部搜索,以增强生成结果。 + en_US: Allow the model to perform external search to enhance the generation results. + required: false diff --git a/api/core/model_runtime/model_providers/baichuan/llm/baichuan2-turbo.yaml b/api/core/model_runtime/model_providers/baichuan/llm/baichuan2-turbo.yaml index 004776df67..046d4132ef 100644 --- a/api/core/model_runtime/model_providers/baichuan/llm/baichuan2-turbo.yaml +++ b/api/core/model_runtime/model_providers/baichuan/llm/baichuan2-turbo.yaml @@ -3,40 +3,40 @@ label: en_US: Baichuan2-Turbo model_type: llm features: -- agent-thought + - agent-thought model_properties: mode: chat context_size: 192000 parameter_rules: -- name: temperature - use_template: temperature -- name: top_p - use_template: top_p -- name: top_k - label: - zh_Hans: 取样数量 - en_US: Top k - type: int - help: - zh_Hans: 仅从每个后续标记的前 K 个选项中采样。 - en_US: Only sample from the top K options for each subsequent token. - required: false -- name: max_tokens - use_template: max_tokens - required: true - default: 8000 - min: 1 - max: 192000 -- name: presence_penalty - use_template: presence_penalty -- name: frequency_penalty - use_template: frequency_penalty -- name: with_search_enhance - label: - zh_Hans: 搜索增强 - en_US: Search Enhance - type: boolean - help: - zh_Hans: 允许模型自行进行外部搜索,以增强生成结果。 - en_US: Allow the model to perform external search to enhance the generation results. - required: false \ No newline at end of file + - name: temperature + use_template: temperature + - name: top_p + use_template: top_p + - name: top_k + label: + zh_Hans: 取样数量 + en_US: Top k + type: int + help: + zh_Hans: 仅从每个后续标记的前 K 个选项中采样。 + en_US: Only sample from the top K options for each subsequent token. + required: false + - name: max_tokens + use_template: max_tokens + required: true + default: 8000 + min: 1 + max: 192000 + - name: presence_penalty + use_template: presence_penalty + - name: frequency_penalty + use_template: frequency_penalty + - name: with_search_enhance + label: + zh_Hans: 搜索增强 + en_US: Search Enhance + type: boolean + help: + zh_Hans: 允许模型自行进行外部搜索,以增强生成结果。 + en_US: Allow the model to perform external search to enhance the generation results. + required: false diff --git a/api/core/model_runtime/model_providers/baichuan/text_embedding/baichuan-text-embedding.yaml b/api/core/model_runtime/model_providers/baichuan/text_embedding/baichuan-text-embedding.yaml index 71bb8cd567..67e5fcc47c 100644 --- a/api/core/model_runtime/model_providers/baichuan/text_embedding/baichuan-text-embedding.yaml +++ b/api/core/model_runtime/model_providers/baichuan/text_embedding/baichuan-text-embedding.yaml @@ -2,4 +2,4 @@ model: baichuan-text-embedding model_type: text-embedding model_properties: context_size: 512 - max_chunks: 16 \ No newline at end of file + max_chunks: 16 diff --git a/api/core/model_runtime/model_providers/chatglm/chatglm.yaml b/api/core/model_runtime/model_providers/chatglm/chatglm.yaml index 9cf44fcb9f..0c1688c350 100644 --- a/api/core/model_runtime/model_providers/chatglm/chatglm.yaml +++ b/api/core/model_runtime/model_providers/chatglm/chatglm.yaml @@ -13,16 +13,16 @@ help: url: en_US: https://github.com/THUDM/ChatGLM3 supported_model_types: -- llm + - llm configurate_methods: -- predefined-model + - predefined-model provider_credential_schema: credential_form_schemas: - - variable: api_base - label: - en_US: API URL - type: text-input - required: true - placeholder: - zh_Hans: 在此输入您的 API URL - en_US: Enter your API URL + - variable: api_base + label: + en_US: API URL + type: text-input + required: true + placeholder: + zh_Hans: 在此输入您的 API URL + en_US: Enter your API URL diff --git a/api/core/model_runtime/model_providers/chatglm/llm/chatglm2-6b-32k.yaml b/api/core/model_runtime/model_providers/chatglm/llm/chatglm2-6b-32k.yaml index 58172ab77b..d1075d74b5 100644 --- a/api/core/model_runtime/model_providers/chatglm/llm/chatglm2-6b-32k.yaml +++ b/api/core/model_runtime/model_providers/chatglm/llm/chatglm2-6b-32k.yaml @@ -3,19 +3,19 @@ label: en_US: ChatGLM2-6B-32K model_type: llm features: -- agent-thought + - agent-thought model_properties: mode: chat context_size: 32000 parameter_rules: -- name: temperature - use_template: temperature -- name: top_p - use_template: top_p - required: false -- name: max_tokens - use_template: max_tokens - required: true - default: 2000 - min: 1 - max: 32000 \ No newline at end of file + - name: temperature + use_template: temperature + - name: top_p + use_template: top_p + required: false + - name: max_tokens + use_template: max_tokens + required: true + default: 2000 + min: 1 + max: 32000 diff --git a/api/core/model_runtime/model_providers/chatglm/llm/chatglm2-6b.yaml b/api/core/model_runtime/model_providers/chatglm/llm/chatglm2-6b.yaml index 2529fb237b..e3cfeb9001 100644 --- a/api/core/model_runtime/model_providers/chatglm/llm/chatglm2-6b.yaml +++ b/api/core/model_runtime/model_providers/chatglm/llm/chatglm2-6b.yaml @@ -3,19 +3,19 @@ label: en_US: ChatGLM2-6B model_type: llm features: -- agent-thought + - agent-thought model_properties: mode: chat context_size: 2000 parameter_rules: -- name: temperature - use_template: temperature -- name: top_p - use_template: top_p - required: false -- name: max_tokens - use_template: max_tokens - required: true - default: 256 - min: 1 - max: 2000 \ No newline at end of file + - name: temperature + use_template: temperature + - name: top_p + use_template: top_p + required: false + - name: max_tokens + use_template: max_tokens + required: true + default: 256 + min: 1 + max: 2000 diff --git a/api/core/model_runtime/model_providers/chatglm/llm/chatglm3-6b-32k.yaml b/api/core/model_runtime/model_providers/chatglm/llm/chatglm3-6b-32k.yaml index 15b7c41a39..6f34743513 100644 --- a/api/core/model_runtime/model_providers/chatglm/llm/chatglm3-6b-32k.yaml +++ b/api/core/model_runtime/model_providers/chatglm/llm/chatglm3-6b-32k.yaml @@ -3,20 +3,20 @@ label: en_US: ChatGLM3-6B-32K model_type: llm features: -- tool-call -- agent-thought + - tool-call + - agent-thought model_properties: mode: chat context_size: 32000 parameter_rules: -- name: temperature - use_template: temperature -- name: top_p - use_template: top_p - required: false -- name: max_tokens - use_template: max_tokens - required: true - default: 8000 - min: 1 - max: 32000 \ No newline at end of file + - name: temperature + use_template: temperature + - name: top_p + use_template: top_p + required: false + - name: max_tokens + use_template: max_tokens + required: true + default: 8000 + min: 1 + max: 32000 diff --git a/api/core/model_runtime/model_providers/chatglm/llm/chatglm3-6b.yaml b/api/core/model_runtime/model_providers/chatglm/llm/chatglm3-6b.yaml index ac31c145a8..d6d87e2e09 100644 --- a/api/core/model_runtime/model_providers/chatglm/llm/chatglm3-6b.yaml +++ b/api/core/model_runtime/model_providers/chatglm/llm/chatglm3-6b.yaml @@ -3,20 +3,20 @@ label: en_US: ChatGLM3-6B model_type: llm features: -- tool-call -- agent-thought + - tool-call + - agent-thought model_properties: mode: chat context_size: 8000 parameter_rules: -- name: temperature - use_template: temperature -- name: top_p - use_template: top_p - required: false -- name: max_tokens - use_template: max_tokens - required: true - default: 256 - min: 1 - max: 8000 \ No newline at end of file + - name: temperature + use_template: temperature + - name: top_p + use_template: top_p + required: false + - name: max_tokens + use_template: max_tokens + required: true + default: 256 + min: 1 + max: 8000 diff --git a/api/core/model_runtime/model_providers/cohere/cohere.yaml b/api/core/model_runtime/model_providers/cohere/cohere.yaml index 6e1cb0d419..b9a5fcfe0c 100644 --- a/api/core/model_runtime/model_providers/cohere/cohere.yaml +++ b/api/core/model_runtime/model_providers/cohere/cohere.yaml @@ -14,18 +14,18 @@ help: url: en_US: https://dashboard.cohere.com/api-keys supported_model_types: -- rerank + - rerank configurate_methods: -- predefined-model + - predefined-model provider_credential_schema: credential_form_schemas: - - variable: api_key - label: - zh_Hans: API Key - en_US: API Key - type: secret-input - required: true - placeholder: - zh_Hans: 请填写 API Key - en_US: Please fill in API Key - show_on: [] \ No newline at end of file + - variable: api_key + label: + zh_Hans: API Key + en_US: API Key + type: secret-input + required: true + placeholder: + zh_Hans: 请填写 API Key + en_US: Please fill in API Key + show_on: [ ] diff --git a/api/core/model_runtime/model_providers/cohere/rerank/rerank-multilingual-v2.0.yaml b/api/core/model_runtime/model_providers/cohere/rerank/rerank-multilingual-v2.0.yaml index c55ec5e258..c9b90387cf 100644 --- a/api/core/model_runtime/model_providers/cohere/rerank/rerank-multilingual-v2.0.yaml +++ b/api/core/model_runtime/model_providers/cohere/rerank/rerank-multilingual-v2.0.yaml @@ -1,4 +1,4 @@ model: rerank-multilingual-v2.0 model_type: rerank model_properties: - context_size: 5120 \ No newline at end of file + context_size: 5120 diff --git a/api/core/model_runtime/model_providers/google/google.yaml b/api/core/model_runtime/model_providers/google/google.yaml index de52e554e1..69d4e371c4 100644 --- a/api/core/model_runtime/model_providers/google/google.yaml +++ b/api/core/model_runtime/model_providers/google/google.yaml @@ -16,17 +16,16 @@ help: url: en_US: https://ai.google.dev/ supported_model_types: -- llm + - llm configurate_methods: -- predefined-model + - predefined-model provider_credential_schema: credential_form_schemas: - - variable: google_api_key - label: - en_US: API Key - type: secret-input - required: true - placeholder: - zh_Hans: 在此输入您的 API Key - en_US: Enter your API Key - \ No newline at end of file + - variable: google_api_key + label: + en_US: API Key + type: secret-input + required: true + placeholder: + zh_Hans: 在此输入您的 API Key + en_US: Enter your API Key diff --git a/api/core/model_runtime/model_providers/google/llm/gemini-pro-vision.yaml b/api/core/model_runtime/model_providers/google/llm/gemini-pro-vision.yaml index 0ad3167ff4..075e484e46 100644 --- a/api/core/model_runtime/model_providers/google/llm/gemini-pro-vision.yaml +++ b/api/core/model_runtime/model_providers/google/llm/gemini-pro-vision.yaml @@ -3,32 +3,32 @@ label: en_US: Gemini Pro Vision model_type: llm features: -- vision + - vision model_properties: mode: chat context_size: 12288 parameter_rules: -- name: temperature - use_template: temperature -- name: top_p - use_template: top_p -- name: top_k - label: - zh_Hans: 取样数量 - en_US: Top k - type: int - help: - zh_Hans: 仅从每个后续标记的前 K 个选项中采样。 - en_US: Only sample from the top K options for each subsequent token. - required: false -- name: max_tokens_to_sample - use_template: max_tokens - required: true - default: 4096 - min: 1 - max: 4096 + - name: temperature + use_template: temperature + - name: top_p + use_template: top_p + - name: top_k + label: + zh_Hans: 取样数量 + en_US: Top k + type: int + help: + zh_Hans: 仅从每个后续标记的前 K 个选项中采样。 + en_US: Only sample from the top K options for each subsequent token. + required: false + - name: max_tokens_to_sample + use_template: max_tokens + required: true + default: 4096 + min: 1 + max: 4096 pricing: input: '0.00' output: '0.00' unit: '0.000001' - currency: USD \ No newline at end of file + currency: USD diff --git a/api/core/model_runtime/model_providers/google/llm/gemini-pro.yaml b/api/core/model_runtime/model_providers/google/llm/gemini-pro.yaml index 19aacfbab1..3b98e615e6 100644 --- a/api/core/model_runtime/model_providers/google/llm/gemini-pro.yaml +++ b/api/core/model_runtime/model_providers/google/llm/gemini-pro.yaml @@ -3,32 +3,32 @@ label: en_US: Gemini Pro model_type: llm features: -- agent-thought + - agent-thought model_properties: mode: chat context_size: 30720 parameter_rules: -- name: temperature - use_template: temperature -- name: top_p - use_template: top_p -- name: top_k - label: - zh_Hans: 取样数量 - en_US: Top k - type: int - help: - zh_Hans: 仅从每个后续标记的前 K 个选项中采样。 - en_US: Only sample from the top K options for each subsequent token. - required: false -- name: max_tokens_to_sample - use_template: max_tokens - required: true - default: 2048 - min: 1 - max: 2048 + - name: temperature + use_template: temperature + - name: top_p + use_template: top_p + - name: top_k + label: + zh_Hans: 取样数量 + en_US: Top k + type: int + help: + zh_Hans: 仅从每个后续标记的前 K 个选项中采样。 + en_US: Only sample from the top K options for each subsequent token. + required: false + - name: max_tokens_to_sample + use_template: max_tokens + required: true + default: 2048 + min: 1 + max: 2048 pricing: input: '0.00' output: '0.00' unit: '0.000001' - currency: USD \ No newline at end of file + currency: USD diff --git a/api/core/model_runtime/model_providers/huggingface_hub/huggingface_hub.yaml b/api/core/model_runtime/model_providers/huggingface_hub/huggingface_hub.yaml index 0bdbbe7b7f..1df234cf26 100644 --- a/api/core/model_runtime/model_providers/huggingface_hub/huggingface_hub.yaml +++ b/api/core/model_runtime/model_providers/huggingface_hub/huggingface_hub.yaml @@ -2,9 +2,9 @@ provider: huggingface_hub label: en_US: Hugging Face Model icon_small: - en_US: icon_s_en.svg + en_US: icon_s_en.svg icon_large: - en_US: icon_l_en.svg + en_US: icon_l_en.svg background: "#FFF8DC" help: title: @@ -13,90 +13,90 @@ help: url: en_US: https://huggingface.co/settings/tokens supported_model_types: -- llm -- text-embedding + - llm + - text-embedding configurate_methods: -- customizable-model + - customizable-model model_credential_schema: model: label: en_US: Model Name zh_Hans: 模型名称 credential_form_schemas: - - variable: huggingfacehub_api_type - label: - en_US: Endpoint Type - zh_Hans: 端点类型 - type: radio - required: true - default: hosted_inference_api - options: - - value: hosted_inference_api - label: - en_US: Hosted Inference API - - value: inference_endpoints - label: - en_US: Inference Endpoints - - variable: huggingfacehub_api_token - label: - en_US: API Token - zh_Hans: API Token - type: secret-input - required: true - placeholder: - en_US: Enter your Hugging Face Hub API Token here - zh_Hans: 在此输入您的 Hugging Face Hub API Token - - variable: huggingface_namespace - label: - en_US: 'User Name / Organization Name' - zh_Hans: '用户名 / 组织名称' - type: text-input - required: true - placeholder: - en_US: 'Enter your User Name / Organization Name here' - zh_Hans: '在此输入您的用户名 / 组织名称' - show_on: - - variable: __model_type - value: text-embedding - variable: huggingfacehub_api_type - value: inference_endpoints - - variable: huggingfacehub_endpoint_url - label: - en_US: Endpoint URL - zh_Hans: 端点 URL - type: text-input - required: true - placeholder: - en_US: Enter your Endpoint URL here - zh_Hans: 在此输入您的端点 URL - show_on: - - variable: huggingfacehub_api_type - value: inference_endpoints - - variable: task_type - label: - en_US: Task - zh_Hans: Task - type: select - options: - - value: text2text-generation label: - en_US: Text-to-Text Generation - show_on: - - variable: __model_type - value: llm - - value: text-generation + en_US: Endpoint Type + zh_Hans: 端点类型 + type: radio + required: true + default: hosted_inference_api + options: + - value: hosted_inference_api + label: + en_US: Hosted Inference API + - value: inference_endpoints + label: + en_US: Inference Endpoints + - variable: huggingfacehub_api_token label: - en_US: Text Generation - zh_Hans: 文本生成 - show_on: - - variable: __model_type - value: llm - - value: feature-extraction + en_US: API Token + zh_Hans: API Token + type: secret-input + required: true + placeholder: + en_US: Enter your Hugging Face Hub API Token here + zh_Hans: 在此输入您的 Hugging Face Hub API Token + - variable: huggingface_namespace label: - en_US: Feature Extraction + en_US: 'User Name / Organization Name' + zh_Hans: '用户名 / 组织名称' + type: text-input + required: true + placeholder: + en_US: 'Enter your User Name / Organization Name here' + zh_Hans: '在此输入您的用户名 / 组织名称' show_on: - - variable: __model_type - value: text-embedding - show_on: - - variable: huggingfacehub_api_type - value: inference_endpoints + - variable: __model_type + value: text-embedding + - variable: huggingfacehub_api_type + value: inference_endpoints + - variable: huggingfacehub_endpoint_url + label: + en_US: Endpoint URL + zh_Hans: 端点 URL + type: text-input + required: true + placeholder: + en_US: Enter your Endpoint URL here + zh_Hans: 在此输入您的端点 URL + show_on: + - variable: huggingfacehub_api_type + value: inference_endpoints + - variable: task_type + label: + en_US: Task + zh_Hans: Task + type: select + options: + - value: text2text-generation + label: + en_US: Text-to-Text Generation + show_on: + - variable: __model_type + value: llm + - value: text-generation + label: + en_US: Text Generation + zh_Hans: 文本生成 + show_on: + - variable: __model_type + value: llm + - value: feature-extraction + label: + en_US: Feature Extraction + show_on: + - variable: __model_type + value: text-embedding + show_on: + - variable: huggingfacehub_api_type + value: inference_endpoints diff --git a/api/core/model_runtime/model_providers/jina/jina.yaml b/api/core/model_runtime/model_providers/jina/jina.yaml index 190a95d10b..ad90344d53 100644 --- a/api/core/model_runtime/model_providers/jina/jina.yaml +++ b/api/core/model_runtime/model_providers/jina/jina.yaml @@ -2,7 +2,7 @@ provider: jina label: en_US: Jina description: - en_US: Embedding Model Supported + en_US: Embedding Model Supported icon_small: en_US: icon_s_en.svg icon_large: @@ -15,16 +15,16 @@ help: url: en_US: https://jina.ai/embeddings/ supported_model_types: -- text-embedding + - text-embedding configurate_methods: -- predefined-model + - predefined-model provider_credential_schema: credential_form_schemas: - - variable: api_key - label: - en_US: API Key - type: secret-input - required: true - placeholder: - zh_Hans: 在此输入您的 API Key - en_US: Enter your API Key \ No newline at end of file + - variable: api_key + label: + en_US: API Key + type: secret-input + required: true + placeholder: + zh_Hans: 在此输入您的 API Key + en_US: Enter your API Key diff --git a/api/core/model_runtime/model_providers/jina/text_embedding/jina-embeddings-v2-base-en.yaml b/api/core/model_runtime/model_providers/jina/text_embedding/jina-embeddings-v2-base-en.yaml index f44cca4344..a9b2cd4efb 100644 --- a/api/core/model_runtime/model_providers/jina/text_embedding/jina-embeddings-v2-base-en.yaml +++ b/api/core/model_runtime/model_providers/jina/text_embedding/jina-embeddings-v2-base-en.yaml @@ -6,4 +6,4 @@ model_properties: pricing: input: '0.001' unit: '0.001' - currency: USD \ No newline at end of file + currency: USD diff --git a/api/core/model_runtime/model_providers/jina/text_embedding/jina-embeddings-v2-small-en.yaml b/api/core/model_runtime/model_providers/jina/text_embedding/jina-embeddings-v2-small-en.yaml index 5c0dcd84f4..c92779d499 100644 --- a/api/core/model_runtime/model_providers/jina/text_embedding/jina-embeddings-v2-small-en.yaml +++ b/api/core/model_runtime/model_providers/jina/text_embedding/jina-embeddings-v2-small-en.yaml @@ -6,4 +6,4 @@ model_properties: pricing: input: '0.001' unit: '0.001' - currency: USD \ No newline at end of file + currency: USD diff --git a/api/core/model_runtime/model_providers/localai/localai.yaml b/api/core/model_runtime/model_providers/localai/localai.yaml index d25477b549..6cea787901 100644 --- a/api/core/model_runtime/model_providers/localai/localai.yaml +++ b/api/core/model_runtime/model_providers/localai/localai.yaml @@ -13,10 +13,10 @@ help: url: en_US: https://github.com/go-skynet/LocalAI supported_model_types: -- llm -- text-embedding + - llm + - text-embedding configurate_methods: -- customizable-model + - customizable-model model_credential_schema: model: label: @@ -26,33 +26,33 @@ model_credential_schema: en_US: Enter your model name zh_Hans: 输入模型名称 credential_form_schemas: - - variable: completion_type - show_on: - - variable: __model_type - value: llm - label: - en_US: Completion type - type: select - required: false - default: chat_completion - placeholder: - zh_Hans: 选择对话类型 - en_US: Select completion type - options: - - value: completion - label: - en_US: Completion - zh_Hans: 补全 - - value: chat_completion - label: - en_US: ChatCompletion - zh_Hans: 对话 - - variable: server_url - label: - zh_Hans: 服务器URL - en_US: Server url - type: text-input - required: true - placeholder: - zh_Hans: 在此输入LocalAI的服务器地址,如 https://example.com/xxx - en_US: Enter the url of your LocalAI, for example https://example.com/xxx \ No newline at end of file + - variable: completion_type + show_on: + - variable: __model_type + value: llm + label: + en_US: Completion type + type: select + required: false + default: chat_completion + placeholder: + zh_Hans: 选择对话类型 + en_US: Select completion type + options: + - value: completion + label: + en_US: Completion + zh_Hans: 补全 + - value: chat_completion + label: + en_US: ChatCompletion + zh_Hans: 对话 + - variable: server_url + label: + zh_Hans: 服务器URL + en_US: Server url + type: text-input + required: true + placeholder: + zh_Hans: 在此输入LocalAI的服务器地址,如 https://example.com/xxx + en_US: Enter the url of your LocalAI, for example https://example.com/xxx diff --git a/api/core/model_runtime/model_providers/minimax/llm/abab5-chat.yaml b/api/core/model_runtime/model_providers/minimax/llm/abab5-chat.yaml index b04dc9222e..f946848c13 100644 --- a/api/core/model_runtime/model_providers/minimax/llm/abab5-chat.yaml +++ b/api/core/model_runtime/model_providers/minimax/llm/abab5-chat.yaml @@ -3,27 +3,27 @@ label: en_US: Abab5-Chat model_type: llm features: -- agent-thought + - agent-thought model_properties: mode: chat context_size: 6144 parameter_rules: -- name: temperature - use_template: temperature -- name: top_p - use_template: top_p -- name: max_tokens - use_template: max_tokens - required: true - default: 6144 - min: 1 - max: 6144 -- name: presence_penalty - use_template: presence_penalty -- name: frequency_penalty - use_template: frequency_penalty + - name: temperature + use_template: temperature + - name: top_p + use_template: top_p + - name: max_tokens + use_template: max_tokens + required: true + default: 6144 + min: 1 + max: 6144 + - name: presence_penalty + use_template: presence_penalty + - name: frequency_penalty + use_template: frequency_penalty pricing: input: '0.00' output: '0.015' unit: '0.001' - currency: RMB \ No newline at end of file + currency: RMB diff --git a/api/core/model_runtime/model_providers/minimax/llm/abab5.5-chat.yaml b/api/core/model_runtime/model_providers/minimax/llm/abab5.5-chat.yaml index ce10061483..b52f875d75 100644 --- a/api/core/model_runtime/model_providers/minimax/llm/abab5.5-chat.yaml +++ b/api/core/model_runtime/model_providers/minimax/llm/abab5.5-chat.yaml @@ -3,34 +3,34 @@ label: en_US: Abab5.5-Chat model_type: llm features: -- agent-thought + - agent-thought model_properties: mode: chat context_size: 16384 parameter_rules: -- name: temperature - use_template: temperature -- name: top_p - use_template: top_p -- name: max_tokens - use_template: max_tokens - required: true - default: 6144 - min: 1 - max: 16384 -- name: presence_penalty - use_template: presence_penalty -- name: frequency_penalty - use_template: frequency_penalty -- name: plugin_web_search - required: false - default: false - type: boolean - label: - en_US: Enable Web Search - zh_Hans: 开启网页搜索 + - name: temperature + use_template: temperature + - name: top_p + use_template: top_p + - name: max_tokens + use_template: max_tokens + required: true + default: 6144 + min: 1 + max: 16384 + - name: presence_penalty + use_template: presence_penalty + - name: frequency_penalty + use_template: frequency_penalty + - name: plugin_web_search + required: false + default: false + type: boolean + label: + en_US: Enable Web Search + zh_Hans: 开启网页搜索 pricing: input: '0.00' output: '0.015' unit: '0.001' - currency: RMB \ No newline at end of file + currency: RMB diff --git a/api/core/model_runtime/model_providers/minimax/minimax.yaml b/api/core/model_runtime/model_providers/minimax/minimax.yaml index c2d6337481..0a97ff9bb9 100644 --- a/api/core/model_runtime/model_providers/minimax/minimax.yaml +++ b/api/core/model_runtime/model_providers/minimax/minimax.yaml @@ -13,25 +13,25 @@ help: url: en_US: https://api.minimax.chat/user-center/basic-information/interface-key supported_model_types: -- llm -- text-embedding + - llm + - text-embedding configurate_methods: -- predefined-model + - predefined-model provider_credential_schema: credential_form_schemas: - - variable: minimax_api_key - label: - en_US: API Key - type: secret-input - required: true - placeholder: - zh_Hans: 在此输入您的 API Key - en_US: Enter your API Key - - variable: minimax_group_id - label: - en_US: Group ID - type: text-input - required: true - placeholder: - zh_Hans: 在此输入您的 Group ID - en_US: Enter your group ID \ No newline at end of file + - variable: minimax_api_key + label: + en_US: API Key + type: secret-input + required: true + placeholder: + zh_Hans: 在此输入您的 API Key + en_US: Enter your API Key + - variable: minimax_group_id + label: + en_US: Group ID + type: text-input + required: true + placeholder: + zh_Hans: 在此输入您的 Group ID + en_US: Enter your group ID diff --git a/api/core/model_runtime/model_providers/minimax/text_embedding/embo-01.yaml b/api/core/model_runtime/model_providers/minimax/text_embedding/embo-01.yaml index 239a2d762e..33546eafd3 100644 --- a/api/core/model_runtime/model_providers/minimax/text_embedding/embo-01.yaml +++ b/api/core/model_runtime/model_providers/minimax/text_embedding/embo-01.yaml @@ -6,4 +6,4 @@ model_properties: pricing: input: '0.0005' unit: '0.001' - currency: RMB \ No newline at end of file + currency: RMB diff --git a/api/core/model_runtime/model_providers/openai/llm/_position.yaml b/api/core/model_runtime/model_providers/openai/llm/_position.yaml index 4f69acb30b..1457101197 100644 --- a/api/core/model_runtime/model_providers/openai/llm/_position.yaml +++ b/api/core/model_runtime/model_providers/openai/llm/_position.yaml @@ -8,4 +8,4 @@ - gpt-3.5-turbo-1106 - gpt-3.5-turbo-0613 - gpt-3.5-turbo-instruct -- text-davinci-003 \ No newline at end of file +- text-davinci-003 diff --git a/api/core/model_runtime/model_providers/openai/llm/gpt-3.5-turbo-0613.yaml b/api/core/model_runtime/model_providers/openai/llm/gpt-3.5-turbo-0613.yaml index 36ca32f1c6..bc130b02fc 100644 --- a/api/core/model_runtime/model_providers/openai/llm/gpt-3.5-turbo-0613.yaml +++ b/api/core/model_runtime/model_providers/openai/llm/gpt-3.5-turbo-0613.yaml @@ -4,27 +4,27 @@ label: en_US: gpt-3.5-turbo-0613 model_type: llm features: -- multi-tool-call -- agent-thought + - multi-tool-call + - agent-thought model_properties: mode: chat context_size: 4096 parameter_rules: -- name: temperature - use_template: temperature -- name: top_p - use_template: top_p -- name: presence_penalty - use_template: presence_penalty -- name: frequency_penalty - use_template: frequency_penalty -- name: max_tokens - use_template: max_tokens - default: 512 - min: 1 - max: 4096 + - name: temperature + use_template: temperature + - name: top_p + use_template: top_p + - name: presence_penalty + use_template: presence_penalty + - name: frequency_penalty + use_template: frequency_penalty + - name: max_tokens + use_template: max_tokens + default: 512 + min: 1 + max: 4096 pricing: input: '0.0015' output: '0.002' unit: '0.001' - currency: USD \ No newline at end of file + currency: USD diff --git a/api/core/model_runtime/model_providers/openai/llm/gpt-3.5-turbo-1106.yaml b/api/core/model_runtime/model_providers/openai/llm/gpt-3.5-turbo-1106.yaml index 77e40d745d..ff260bb367 100644 --- a/api/core/model_runtime/model_providers/openai/llm/gpt-3.5-turbo-1106.yaml +++ b/api/core/model_runtime/model_providers/openai/llm/gpt-3.5-turbo-1106.yaml @@ -4,27 +4,27 @@ label: en_US: gpt-3.5-turbo-1106 model_type: llm features: -- multi-tool-call -- agent-thought + - multi-tool-call + - agent-thought model_properties: mode: chat context_size: 16385 parameter_rules: -- name: temperature - use_template: temperature -- name: top_p - use_template: top_p -- name: presence_penalty - use_template: presence_penalty -- name: frequency_penalty - use_template: frequency_penalty -- name: max_tokens - use_template: max_tokens - default: 512 - min: 1 - max: 16385 + - name: temperature + use_template: temperature + - name: top_p + use_template: top_p + - name: presence_penalty + use_template: presence_penalty + - name: frequency_penalty + use_template: frequency_penalty + - name: max_tokens + use_template: max_tokens + default: 512 + min: 1 + max: 16385 pricing: input: '0.001' output: '0.002' unit: '0.001' - currency: USD \ No newline at end of file + currency: USD diff --git a/api/core/model_runtime/model_providers/openai/llm/gpt-3.5-turbo-16k-0613.yaml b/api/core/model_runtime/model_providers/openai/llm/gpt-3.5-turbo-16k-0613.yaml index 438060724e..93d0113b8a 100644 --- a/api/core/model_runtime/model_providers/openai/llm/gpt-3.5-turbo-16k-0613.yaml +++ b/api/core/model_runtime/model_providers/openai/llm/gpt-3.5-turbo-16k-0613.yaml @@ -4,27 +4,27 @@ label: en_US: gpt-3.5-turbo-16k-0613 model_type: llm features: -- multi-tool-call -- agent-thought + - multi-tool-call + - agent-thought model_properties: mode: chat context_size: 16385 parameter_rules: -- name: temperature - use_template: temperature -- name: top_p - use_template: top_p -- name: presence_penalty - use_template: presence_penalty -- name: frequency_penalty - use_template: frequency_penalty -- name: max_tokens - use_template: max_tokens - default: 512 - min: 1 - max: 16385 + - name: temperature + use_template: temperature + - name: top_p + use_template: top_p + - name: presence_penalty + use_template: presence_penalty + - name: frequency_penalty + use_template: frequency_penalty + - name: max_tokens + use_template: max_tokens + default: 512 + min: 1 + max: 16385 pricing: input: '0.003' output: '0.004' unit: '0.001' - currency: USD \ No newline at end of file + currency: USD diff --git a/api/core/model_runtime/model_providers/openai/llm/gpt-3.5-turbo-16k.yaml b/api/core/model_runtime/model_providers/openai/llm/gpt-3.5-turbo-16k.yaml index 95ef749695..ddb4da775b 100644 --- a/api/core/model_runtime/model_providers/openai/llm/gpt-3.5-turbo-16k.yaml +++ b/api/core/model_runtime/model_providers/openai/llm/gpt-3.5-turbo-16k.yaml @@ -4,27 +4,27 @@ label: en_US: gpt-3.5-turbo-16k model_type: llm features: -- multi-tool-call -- agent-thought + - multi-tool-call + - agent-thought model_properties: mode: chat context_size: 16385 parameter_rules: -- name: temperature - use_template: temperature -- name: top_p - use_template: top_p -- name: presence_penalty - use_template: presence_penalty -- name: frequency_penalty - use_template: frequency_penalty -- name: max_tokens - use_template: max_tokens - default: 512 - min: 1 - max: 16385 + - name: temperature + use_template: temperature + - name: top_p + use_template: top_p + - name: presence_penalty + use_template: presence_penalty + - name: frequency_penalty + use_template: frequency_penalty + - name: max_tokens + use_template: max_tokens + default: 512 + min: 1 + max: 16385 pricing: input: '0.003' output: '0.004' unit: '0.001' - currency: USD \ No newline at end of file + currency: USD diff --git a/api/core/model_runtime/model_providers/openai/llm/gpt-3.5-turbo-instruct.yaml b/api/core/model_runtime/model_providers/openai/llm/gpt-3.5-turbo-instruct.yaml index c64fa6499d..926ee05d97 100644 --- a/api/core/model_runtime/model_providers/openai/llm/gpt-3.5-turbo-instruct.yaml +++ b/api/core/model_runtime/model_providers/openai/llm/gpt-3.5-turbo-instruct.yaml @@ -3,26 +3,26 @@ label: zh_Hans: gpt-3.5-turbo-instruct en_US: gpt-3.5-turbo-instruct model_type: llm -features: [] +features: [ ] model_properties: mode: completion context_size: 4096 parameter_rules: -- name: temperature - use_template: temperature -- name: top_p - use_template: top_p -- name: presence_penalty - use_template: presence_penalty -- name: frequency_penalty - use_template: frequency_penalty -- name: max_tokens - use_template: max_tokens - default: 512 - min: 1 - max: 4096 + - name: temperature + use_template: temperature + - name: top_p + use_template: top_p + - name: presence_penalty + use_template: presence_penalty + - name: frequency_penalty + use_template: frequency_penalty + - name: max_tokens + use_template: max_tokens + default: 512 + min: 1 + max: 4096 pricing: input: '0.0015' output: '0.002' unit: '0.001' - currency: USD \ No newline at end of file + currency: USD diff --git a/api/core/model_runtime/model_providers/openai/llm/gpt-3.5-turbo.yaml b/api/core/model_runtime/model_providers/openai/llm/gpt-3.5-turbo.yaml index 66f6f51516..ee8ad8d302 100644 --- a/api/core/model_runtime/model_providers/openai/llm/gpt-3.5-turbo.yaml +++ b/api/core/model_runtime/model_providers/openai/llm/gpt-3.5-turbo.yaml @@ -4,27 +4,27 @@ label: en_US: gpt-3.5-turbo model_type: llm features: -- multi-tool-call -- agent-thought + - multi-tool-call + - agent-thought model_properties: mode: chat context_size: 4096 parameter_rules: -- name: temperature - use_template: temperature -- name: top_p - use_template: top_p -- name: presence_penalty - use_template: presence_penalty -- name: frequency_penalty - use_template: frequency_penalty -- name: max_tokens - use_template: max_tokens - default: 512 - min: 1 - max: 4096 + - name: temperature + use_template: temperature + - name: top_p + use_template: top_p + - name: presence_penalty + use_template: presence_penalty + - name: frequency_penalty + use_template: frequency_penalty + - name: max_tokens + use_template: max_tokens + default: 512 + min: 1 + max: 4096 pricing: input: '0.001' output: '0.002' unit: '0.001' - currency: USD \ No newline at end of file + currency: USD diff --git a/api/core/model_runtime/model_providers/openai/llm/gpt-4-1106-preview.yaml b/api/core/model_runtime/model_providers/openai/llm/gpt-4-1106-preview.yaml index 498dfdd0b4..8adc77c380 100644 --- a/api/core/model_runtime/model_providers/openai/llm/gpt-4-1106-preview.yaml +++ b/api/core/model_runtime/model_providers/openai/llm/gpt-4-1106-preview.yaml @@ -4,55 +4,55 @@ label: en_US: gpt-4-1106-preview model_type: llm features: -- multi-tool-call -- agent-thought + - multi-tool-call + - agent-thought model_properties: mode: chat context_size: 128000 parameter_rules: -- name: temperature - use_template: temperature -- name: top_p - use_template: top_p -- name: presence_penalty - use_template: presence_penalty -- name: frequency_penalty - use_template: frequency_penalty -- name: max_tokens - use_template: max_tokens - default: 512 - min: 1 - max: 128000 -- name: seed - label: - zh_Hans: 种子 - en_US: Seed - type: int - help: - zh_Hans: 如果指定,模型将尽最大努力进行确定性采样,使得重复的具有相同种子和参数的请求应该返回相同的结果。不能保证确定性,您应该参考 system_fingerprint - 响应参数来监视变化。 - en_US: If specified, model will make a best effort to sample deterministically, - such that repeated requests with the same seed and parameters should return - the same result. Determinism is not guaranteed, and you should refer to the - system_fingerprint response parameter to monitor changes in the backend. - required: false - precision: 2 - min: 0 - max: 1 -- name: response_format - label: - zh_Hans: 回复格式 - en_US: response_format - type: string - help: - zh_Hans: 指定模型必须输出的格式 - en_US: specifying the format that the model must output - required: false - options: - - text - - json_object + - name: temperature + use_template: temperature + - name: top_p + use_template: top_p + - name: presence_penalty + use_template: presence_penalty + - name: frequency_penalty + use_template: frequency_penalty + - name: max_tokens + use_template: max_tokens + default: 512 + min: 1 + max: 128000 + - name: seed + label: + zh_Hans: 种子 + en_US: Seed + type: int + help: + zh_Hans: 如果指定,模型将尽最大努力进行确定性采样,使得重复的具有相同种子和参数的请求应该返回相同的结果。不能保证确定性,您应该参考 system_fingerprint + 响应参数来监视变化。 + en_US: If specified, model will make a best effort to sample deterministically, + such that repeated requests with the same seed and parameters should return + the same result. Determinism is not guaranteed, and you should refer to the + system_fingerprint response parameter to monitor changes in the backend. + required: false + precision: 2 + min: 0 + max: 1 + - name: response_format + label: + zh_Hans: 回复格式 + en_US: response_format + type: string + help: + zh_Hans: 指定模型必须输出的格式 + en_US: specifying the format that the model must output + required: false + options: + - text + - json_object pricing: input: '0.01' output: '0.03' unit: '0.001' - currency: USD \ No newline at end of file + currency: USD diff --git a/api/core/model_runtime/model_providers/openai/llm/gpt-4-32k.yaml b/api/core/model_runtime/model_providers/openai/llm/gpt-4-32k.yaml index 95f2a8b445..296c88a379 100644 --- a/api/core/model_runtime/model_providers/openai/llm/gpt-4-32k.yaml +++ b/api/core/model_runtime/model_providers/openai/llm/gpt-4-32k.yaml @@ -4,55 +4,55 @@ label: en_US: gpt-4-32k model_type: llm features: -- multi-tool-call -- agent-thought + - multi-tool-call + - agent-thought model_properties: mode: chat context_size: 32768 parameter_rules: -- name: temperature - use_template: temperature -- name: top_p - use_template: top_p -- name: presence_penalty - use_template: presence_penalty -- name: frequency_penalty - use_template: frequency_penalty -- name: max_tokens - use_template: max_tokens - default: 512 - min: 1 - max: 32768 -- name: seed - label: - zh_Hans: 种子 - en_US: Seed - type: int - help: - zh_Hans: 如果指定,模型将尽最大努力进行确定性采样,使得重复的具有相同种子和参数的请求应该返回相同的结果。不能保证确定性,您应该参考 system_fingerprint - 响应参数来监视变化。 - en_US: If specified, model will make a best effort to sample deterministically, - such that repeated requests with the same seed and parameters should return - the same result. Determinism is not guaranteed, and you should refer to the - system_fingerprint response parameter to monitor changes in the backend. - required: false - precision: 2 - min: 0 - max: 1 -- name: response_format - label: - zh_Hans: 回复格式 - en_US: response_format - type: string - help: - zh_Hans: 指定模型必须输出的格式 - en_US: specifying the format that the model must output - required: false - options: - - text - - json_object + - name: temperature + use_template: temperature + - name: top_p + use_template: top_p + - name: presence_penalty + use_template: presence_penalty + - name: frequency_penalty + use_template: frequency_penalty + - name: max_tokens + use_template: max_tokens + default: 512 + min: 1 + max: 32768 + - name: seed + label: + zh_Hans: 种子 + en_US: Seed + type: int + help: + zh_Hans: 如果指定,模型将尽最大努力进行确定性采样,使得重复的具有相同种子和参数的请求应该返回相同的结果。不能保证确定性,您应该参考 system_fingerprint + 响应参数来监视变化。 + en_US: If specified, model will make a best effort to sample deterministically, + such that repeated requests with the same seed and parameters should return + the same result. Determinism is not guaranteed, and you should refer to the + system_fingerprint response parameter to monitor changes in the backend. + required: false + precision: 2 + min: 0 + max: 1 + - name: response_format + label: + zh_Hans: 回复格式 + en_US: response_format + type: string + help: + zh_Hans: 指定模型必须输出的格式 + en_US: specifying the format that the model must output + required: false + options: + - text + - json_object pricing: input: '0.06' output: '0.12' unit: '0.001' - currency: USD \ No newline at end of file + currency: USD diff --git a/api/core/model_runtime/model_providers/openai/llm/gpt-4-vision-preview.yaml b/api/core/model_runtime/model_providers/openai/llm/gpt-4-vision-preview.yaml index 45b2e0ad00..13aec8ef53 100644 --- a/api/core/model_runtime/model_providers/openai/llm/gpt-4-vision-preview.yaml +++ b/api/core/model_runtime/model_providers/openai/llm/gpt-4-vision-preview.yaml @@ -4,54 +4,54 @@ label: en_US: gpt-4-vision-preview model_type: llm features: -- vision + - vision model_properties: mode: chat context_size: 128000 parameter_rules: -- name: temperature - use_template: temperature -- name: top_p - use_template: top_p -- name: presence_penalty - use_template: presence_penalty -- name: frequency_penalty - use_template: frequency_penalty -- name: max_tokens - use_template: max_tokens - default: 512 - min: 1 - max: 128000 -- name: seed - label: - zh_Hans: 种子 - en_US: Seed - type: int - help: - zh_Hans: 如果指定,模型将尽最大努力进行确定性采样,使得重复的具有相同种子和参数的请求应该返回相同的结果。不能保证确定性,您应该参考 system_fingerprint - 响应参数来监视变化。 - en_US: If specified, model will make a best effort to sample deterministically, - such that repeated requests with the same seed and parameters should return - the same result. Determinism is not guaranteed, and you should refer to the - system_fingerprint response parameter to monitor changes in the backend. - required: false - precision: 2 - min: 0 - max: 1 -- name: response_format - label: - zh_Hans: 回复格式 - en_US: response_format - type: string - help: - zh_Hans: 指定模型必须输出的格式 - en_US: specifying the format that the model must output - required: false - options: - - text - - json_object + - name: temperature + use_template: temperature + - name: top_p + use_template: top_p + - name: presence_penalty + use_template: presence_penalty + - name: frequency_penalty + use_template: frequency_penalty + - name: max_tokens + use_template: max_tokens + default: 512 + min: 1 + max: 128000 + - name: seed + label: + zh_Hans: 种子 + en_US: Seed + type: int + help: + zh_Hans: 如果指定,模型将尽最大努力进行确定性采样,使得重复的具有相同种子和参数的请求应该返回相同的结果。不能保证确定性,您应该参考 system_fingerprint + 响应参数来监视变化。 + en_US: If specified, model will make a best effort to sample deterministically, + such that repeated requests with the same seed and parameters should return + the same result. Determinism is not guaranteed, and you should refer to the + system_fingerprint response parameter to monitor changes in the backend. + required: false + precision: 2 + min: 0 + max: 1 + - name: response_format + label: + zh_Hans: 回复格式 + en_US: response_format + type: string + help: + zh_Hans: 指定模型必须输出的格式 + en_US: specifying the format that the model must output + required: false + options: + - text + - json_object pricing: input: '0.01' output: '0.03' unit: '0.001' - currency: USD \ No newline at end of file + currency: USD diff --git a/api/core/model_runtime/model_providers/openai/llm/gpt-4.yaml b/api/core/model_runtime/model_providers/openai/llm/gpt-4.yaml index 7650e5fb1e..14ab1b26bd 100644 --- a/api/core/model_runtime/model_providers/openai/llm/gpt-4.yaml +++ b/api/core/model_runtime/model_providers/openai/llm/gpt-4.yaml @@ -4,55 +4,55 @@ label: en_US: gpt-4 model_type: llm features: -- multi-tool-call -- agent-thought + - multi-tool-call + - agent-thought model_properties: mode: chat context_size: 8192 parameter_rules: -- name: temperature - use_template: temperature -- name: top_p - use_template: top_p -- name: presence_penalty - use_template: presence_penalty -- name: frequency_penalty - use_template: frequency_penalty -- name: max_tokens - use_template: max_tokens - default: 512 - min: 1 - max: 8192 -- name: seed - label: - zh_Hans: 种子 - en_US: Seed - type: int - help: - zh_Hans: 如果指定,模型将尽最大努力进行确定性采样,使得重复的具有相同种子和参数的请求应该返回相同的结果。不能保证确定性,您应该参考 system_fingerprint - 响应参数来监视变化。 - en_US: If specified, model will make a best effort to sample deterministically, - such that repeated requests with the same seed and parameters should return - the same result. Determinism is not guaranteed, and you should refer to the - system_fingerprint response parameter to monitor changes in the backend. - required: false - precision: 2 - min: 0 - max: 1 -- name: response_format - label: - zh_Hans: 回复格式 - en_US: response_format - type: string - help: - zh_Hans: 指定模型必须输出的格式 - en_US: specifying the format that the model must output - required: false - options: - - text - - json_object + - name: temperature + use_template: temperature + - name: top_p + use_template: top_p + - name: presence_penalty + use_template: presence_penalty + - name: frequency_penalty + use_template: frequency_penalty + - name: max_tokens + use_template: max_tokens + default: 512 + min: 1 + max: 8192 + - name: seed + label: + zh_Hans: 种子 + en_US: Seed + type: int + help: + zh_Hans: 如果指定,模型将尽最大努力进行确定性采样,使得重复的具有相同种子和参数的请求应该返回相同的结果。不能保证确定性,您应该参考 system_fingerprint + 响应参数来监视变化。 + en_US: If specified, model will make a best effort to sample deterministically, + such that repeated requests with the same seed and parameters should return + the same result. Determinism is not guaranteed, and you should refer to the + system_fingerprint response parameter to monitor changes in the backend. + required: false + precision: 2 + min: 0 + max: 1 + - name: response_format + label: + zh_Hans: 回复格式 + en_US: response_format + type: string + help: + zh_Hans: 指定模型必须输出的格式 + en_US: specifying the format that the model must output + required: false + options: + - text + - json_object pricing: input: '0.03' output: '0.06' unit: '0.001' - currency: USD \ No newline at end of file + currency: USD diff --git a/api/core/model_runtime/model_providers/openai/llm/text-davinci-003.yaml b/api/core/model_runtime/model_providers/openai/llm/text-davinci-003.yaml index 44aff77629..06d36e8f0e 100644 --- a/api/core/model_runtime/model_providers/openai/llm/text-davinci-003.yaml +++ b/api/core/model_runtime/model_providers/openai/llm/text-davinci-003.yaml @@ -3,26 +3,26 @@ label: zh_Hans: text-davinci-003 en_US: text-davinci-003 model_type: llm -features: [] +features: [ ] model_properties: mode: completion context_size: 4096 parameter_rules: -- name: temperature - use_template: temperature -- name: top_p - use_template: top_p -- name: presence_penalty - use_template: presence_penalty -- name: frequency_penalty - use_template: frequency_penalty -- name: max_tokens - use_template: max_tokens - default: 512 - min: 1 - max: 4096 + - name: temperature + use_template: temperature + - name: top_p + use_template: top_p + - name: presence_penalty + use_template: presence_penalty + - name: frequency_penalty + use_template: frequency_penalty + - name: max_tokens + use_template: max_tokens + default: 512 + min: 1 + max: 4096 pricing: input: '0.001' output: '0.002' unit: '0.001' - currency: USD \ No newline at end of file + currency: USD diff --git a/api/core/model_runtime/model_providers/openai/moderation/text-moderation-stable.yaml b/api/core/model_runtime/model_providers/openai/moderation/text-moderation-stable.yaml index f397a60d50..5ca1809167 100644 --- a/api/core/model_runtime/model_providers/openai/moderation/text-moderation-stable.yaml +++ b/api/core/model_runtime/model_providers/openai/moderation/text-moderation-stable.yaml @@ -2,4 +2,4 @@ model: text-moderation-stable model_type: moderation model_properties: max_chunks: 32 - max_characters_per_chunk: 2000 \ No newline at end of file + max_characters_per_chunk: 2000 diff --git a/api/core/model_runtime/model_providers/openai/openai.yaml b/api/core/model_runtime/model_providers/openai/openai.yaml index 939a584152..02587576bf 100644 --- a/api/core/model_runtime/model_providers/openai/openai.yaml +++ b/api/core/model_runtime/model_providers/openai/openai.yaml @@ -2,8 +2,8 @@ provider: openai label: en_US: OpenAI description: - en_US: Models provided by OpenAI, such as GPT-3.5-Turbo and GPT-4. - zh_Hans: OpenAI 提供的模型,例如 GPT-3.5-Turbo 和 GPT-4。 + en_US: Models provided by OpenAI, such as GPT-3.5-Turbo and GPT-4. + zh_Hans: OpenAI 提供的模型,例如 GPT-3.5-Turbo 和 GPT-4。 icon_small: en_US: icon_s_en.svg icon_large: @@ -16,13 +16,13 @@ help: url: en_US: https://platform.openai.com/account/api-keys supported_model_types: -- llm -- text-embedding -- speech2text -- moderation + - llm + - text-embedding + - speech2text + - moderation configurate_methods: -- predefined-model -- customizable-model + - predefined-model + - customizable-model model_credential_schema: model: label: @@ -32,57 +32,57 @@ model_credential_schema: en_US: Enter your model name zh_Hans: 输入模型名称 credential_form_schemas: - - variable: openai_api_key - label: - en_US: API Key - type: secret-input - required: true - placeholder: - zh_Hans: 在此输入您的 API Key - en_US: Enter your API Key - - variable: openai_organization - label: + - variable: openai_api_key + label: + en_US: API Key + type: secret-input + required: true + placeholder: + zh_Hans: 在此输入您的 API Key + en_US: Enter your API Key + - variable: openai_organization + label: zh_Hans: 组织 ID en_US: Organization - type: text-input - required: false - placeholder: - zh_Hans: 在此输入您的组织 ID - en_US: Enter your Organization ID - - variable: openai_api_base - label: - zh_Hans: API Base - en_US: API Base - type: text-input - required: false - placeholder: - zh_Hans: 在此输入您的 API Base - en_US: Enter your API Base + type: text-input + required: false + placeholder: + zh_Hans: 在此输入您的组织 ID + en_US: Enter your Organization ID + - variable: openai_api_base + label: + zh_Hans: API Base + en_US: API Base + type: text-input + required: false + placeholder: + zh_Hans: 在此输入您的 API Base + en_US: Enter your API Base provider_credential_schema: credential_form_schemas: - - variable: openai_api_key - label: - en_US: API Key - type: secret-input - required: true - placeholder: - zh_Hans: 在此输入您的 API Key - en_US: Enter your API Key - - variable: openai_organization - label: + - variable: openai_api_key + label: + en_US: API Key + type: secret-input + required: true + placeholder: + zh_Hans: 在此输入您的 API Key + en_US: Enter your API Key + - variable: openai_organization + label: zh_Hans: 组织 ID en_US: Organization - type: text-input - required: false - placeholder: - zh_Hans: 在此输入您的组织 ID - en_US: Enter your Organization ID - - variable: openai_api_base - label: - zh_Hans: API Base - en_US: API Base - type: text-input - required: false - placeholder: - zh_Hans: 在此输入您的 API Base - en_US: Enter your API Base + type: text-input + required: false + placeholder: + zh_Hans: 在此输入您的组织 ID + en_US: Enter your Organization ID + - variable: openai_api_base + label: + zh_Hans: API Base + en_US: API Base + type: text-input + required: false + placeholder: + zh_Hans: 在此输入您的 API Base + en_US: Enter your API Base diff --git a/api/core/model_runtime/model_providers/openai/speech2text/whisper-1.yaml b/api/core/model_runtime/model_providers/openai/speech2text/whisper-1.yaml index e822c5a3a3..3cfe6f1a3a 100644 --- a/api/core/model_runtime/model_providers/openai/speech2text/whisper-1.yaml +++ b/api/core/model_runtime/model_providers/openai/speech2text/whisper-1.yaml @@ -2,4 +2,4 @@ model: whisper-1 model_type: speech2text model_properties: file_upload_limit: 25 - supported_file_extensions: mp3,mp4,mpeg,mpga,m4a,wav,webm \ No newline at end of file + supported_file_extensions: mp3,mp4,mpeg,mpga,m4a,wav,webm diff --git a/api/core/model_runtime/model_providers/openai/text_embedding/text-embedidng-ada-002.yaml b/api/core/model_runtime/model_providers/openai/text_embedding/text-embedidng-ada-002.yaml index 2924839431..ef1c49b017 100644 --- a/api/core/model_runtime/model_providers/openai/text_embedding/text-embedidng-ada-002.yaml +++ b/api/core/model_runtime/model_providers/openai/text_embedding/text-embedidng-ada-002.yaml @@ -6,4 +6,4 @@ model_properties: pricing: input: '0.0001' unit: '0.001' - currency: USD \ No newline at end of file + currency: USD diff --git a/api/core/model_runtime/model_providers/openai_api_compatible/openai_api_compatible.yaml b/api/core/model_runtime/model_providers/openai_api_compatible/openai_api_compatible.yaml index e5d5f9547e..26925606b2 100644 --- a/api/core/model_runtime/model_providers/openai_api_compatible/openai_api_compatible.yaml +++ b/api/core/model_runtime/model_providers/openai_api_compatible/openai_api_compatible.yaml @@ -5,73 +5,73 @@ description: en_US: Model providers compatible with OpenAI's API standard, such as LM Studio. zh_Hans: 兼容 OpenAI API 的模型供应商,例如 LM Studio 。 supported_model_types: -- llm -- text-embedding + - llm + - text-embedding configurate_methods: -- customizable-model + - customizable-model model_credential_schema: model: label: en_US: Model Name zh_Hans: 模型名称 placeholder: - en_US: Enter full model name + en_US: Enter full model name zh_Hans: 输入模型全称 credential_form_schemas: - - variable: api_key - label: - en_US: API Key - type: secret-input - required: false - placeholder: - zh_Hans: 在此输入您的 API Key - en_US: Enter your API Key - - variable: endpoint_url - label: - zh_Hans: API endpoint URL - en_US: API endpoint URL - type: text-input - required: true - placeholder: - zh_Hans: Base URL, eg. https://api.openai.com/v1 - en_US: Base URL, eg. https://api.openai.com/v1 - - variable: mode - show_on: - - variable: __model_type - value: llm - label: - en_US: Completion mode - type: select - required: false - default: chat - placeholder: - zh_Hans: 选择对话类型 - en_US: Select completion mode - options: - - value: completion - label: - en_US: Completion - zh_Hans: 补全 - - value: chat - label: - en_US: Chat - zh_Hans: 对话 - - variable: context_size - label: - zh_Hans: 模型上下文长度 - en_US: Model context size - required: true - type: text-input - default: '4096' - placeholder: - zh_Hans: 在此输入您的模型上下文长度 - en_US: Enter your Model context size - - variable: max_tokens_to_sample - label: - zh_Hans: 最大 token 上限 - en_US: Upper bound for max tokens - show_on: - - variable: __model_type - value: llm - default: '4096' - type: text-input \ No newline at end of file + - variable: api_key + label: + en_US: API Key + type: secret-input + required: false + placeholder: + zh_Hans: 在此输入您的 API Key + en_US: Enter your API Key + - variable: endpoint_url + label: + zh_Hans: API endpoint URL + en_US: API endpoint URL + type: text-input + required: true + placeholder: + zh_Hans: Base URL, eg. https://api.openai.com/v1 + en_US: Base URL, eg. https://api.openai.com/v1 + - variable: mode + show_on: + - variable: __model_type + value: llm + label: + en_US: Completion mode + type: select + required: false + default: chat + placeholder: + zh_Hans: 选择对话类型 + en_US: Select completion mode + options: + - value: completion + label: + en_US: Completion + zh_Hans: 补全 + - value: chat + label: + en_US: Chat + zh_Hans: 对话 + - variable: context_size + label: + zh_Hans: 模型上下文长度 + en_US: Model context size + required: true + type: text-input + default: '4096' + placeholder: + zh_Hans: 在此输入您的模型上下文长度 + en_US: Enter your Model context size + - variable: max_tokens_to_sample + label: + zh_Hans: 最大 token 上限 + en_US: Upper bound for max tokens + show_on: + - variable: __model_type + value: llm + default: '4096' + type: text-input diff --git a/api/core/model_runtime/model_providers/openllm/openllm.yaml b/api/core/model_runtime/model_providers/openllm/openllm.yaml index 4cd3136982..bd93baa727 100644 --- a/api/core/model_runtime/model_providers/openllm/openllm.yaml +++ b/api/core/model_runtime/model_providers/openllm/openllm.yaml @@ -13,10 +13,10 @@ help: url: en_US: https://github.com/bentoml/OpenLLM supported_model_types: -- llm -- text-embedding + - llm + - text-embedding configurate_methods: -- customizable-model + - customizable-model model_credential_schema: model: label: @@ -26,12 +26,12 @@ model_credential_schema: en_US: Enter your model name zh_Hans: 输入模型名称 credential_form_schemas: - - variable: server_url - label: - zh_Hans: 服务器URL - en_US: Server url - type: text-input - required: true - placeholder: - zh_Hans: 在此输入OpenLLM的服务器地址,如 https://example.com/xxx - en_US: Enter the url of your OpenLLM, for example https://example.com/xxx \ No newline at end of file + - variable: server_url + label: + zh_Hans: 服务器URL + en_US: Server url + type: text-input + required: true + placeholder: + zh_Hans: 在此输入OpenLLM的服务器地址,如 https://example.com/xxx + en_US: Enter the url of your OpenLLM, for example https://example.com/xxx diff --git a/api/core/model_runtime/model_providers/replicate/replicate.yaml b/api/core/model_runtime/model_providers/replicate/replicate.yaml index 35a4bc9993..11f615dad1 100644 --- a/api/core/model_runtime/model_providers/replicate/replicate.yaml +++ b/api/core/model_runtime/model_providers/replicate/replicate.yaml @@ -13,29 +13,29 @@ help: url: en_US: https://replicate.com/account/api-tokens supported_model_types: -- llm -- text-embedding + - llm + - text-embedding configurate_methods: -- customizable-model + - customizable-model model_credential_schema: model: label: en_US: Model Name zh_Hans: 模型名称 credential_form_schemas: - - variable: replicate_api_token - label: - en_US: API Key - type: secret-input - required: true - placeholder: - zh_Hans: 在此输入您的 Replicate API Key - en_US: Enter your Replicate API Key - - variable: model_version - label: - en_US: Model Version - type: text-input - required: true - placeholder: - zh_Hans: 在此输入您的模型版本 - en_US: Enter your model version \ No newline at end of file + - variable: replicate_api_token + label: + en_US: API Key + type: secret-input + required: true + placeholder: + zh_Hans: 在此输入您的 Replicate API Key + en_US: Enter your Replicate API Key + - variable: model_version + label: + en_US: Model Version + type: text-input + required: true + placeholder: + zh_Hans: 在此输入您的模型版本 + en_US: Enter your model version diff --git a/api/core/model_runtime/model_providers/spark/llm/spark-1.5.yaml b/api/core/model_runtime/model_providers/spark/llm/spark-1.5.yaml index e087ab45e8..effbe45e27 100644 --- a/api/core/model_runtime/model_providers/spark/llm/spark-1.5.yaml +++ b/api/core/model_runtime/model_providers/spark/llm/spark-1.5.yaml @@ -5,29 +5,29 @@ model_type: llm model_properties: mode: chat parameter_rules: -- name: temperature - use_template: temperature - default: 0.5 - help: - zh_Hans: 核采样阈值。用于决定结果随机性,取值越高随机性越强即相同的问题得到的不同答案的可能性越高。 - en_US: Kernel sampling threshold. Used to determine the randomness of the results. The higher the value, the stronger the randomness, that is, the higher the possibility of getting different answers to the same question. -- name: max_tokens - use_template: max_tokens - default: 512 - min: 1 - max: 4096 - help: - zh_Hans: 模型回答的tokens的最大长度。 - en_US: 模型回答的tokens的最大长度。 -- name: top_k - label: - zh_Hans: 取样数量 - en_US: Top k - type: int - default: 4 - min: 1 - max: 6 - help: - zh_Hans: 从 k 个候选中随机选择⼀个(⾮等概率)。 - en_US: Randomly select one from k candidates (non-equal probability). - required: false \ No newline at end of file + - name: temperature + use_template: temperature + default: 0.5 + help: + zh_Hans: 核采样阈值。用于决定结果随机性,取值越高随机性越强即相同的问题得到的不同答案的可能性越高。 + en_US: Kernel sampling threshold. Used to determine the randomness of the results. The higher the value, the stronger the randomness, that is, the higher the possibility of getting different answers to the same question. + - name: max_tokens + use_template: max_tokens + default: 512 + min: 1 + max: 4096 + help: + zh_Hans: 模型回答的tokens的最大长度。 + en_US: 模型回答的tokens的最大长度。 + - name: top_k + label: + zh_Hans: 取样数量 + en_US: Top k + type: int + default: 4 + min: 1 + max: 6 + help: + zh_Hans: 从 k 个候选中随机选择⼀个(⾮等概率)。 + en_US: Randomly select one from k candidates (non-equal probability). + required: false diff --git a/api/core/model_runtime/model_providers/spark/llm/spark-2.yaml b/api/core/model_runtime/model_providers/spark/llm/spark-2.yaml index 0282c71063..2afd1fc538 100644 --- a/api/core/model_runtime/model_providers/spark/llm/spark-2.yaml +++ b/api/core/model_runtime/model_providers/spark/llm/spark-2.yaml @@ -6,29 +6,29 @@ model_type: llm model_properties: mode: chat parameter_rules: -- name: temperature - use_template: temperature - default: 0.5 - help: - zh_Hans: 核采样阈值。用于决定结果随机性,取值越高随机性越强即相同的问题得到的不同答案的可能性越高。 - en_US: Kernel sampling threshold. Used to determine the randomness of the results. The higher the value, the stronger the randomness, that is, the higher the possibility of getting different answers to the same question. -- name: max_tokens - use_template: max_tokens - default: 2048 - min: 1 - max: 8192 - help: - zh_Hans: 模型回答的tokens的最大长度。 - en_US: 模型回答的tokens的最大长度。 -- name: top_k - label: - zh_Hans: 取样数量 - en_US: Top k - type: int - default: 4 - min: 1 - max: 6 - help: - zh_Hans: 从 k 个候选中随机选择⼀个(⾮等概率)。 - en_US: Randomly select one from k candidates (non-equal probability). - required: false \ No newline at end of file + - name: temperature + use_template: temperature + default: 0.5 + help: + zh_Hans: 核采样阈值。用于决定结果随机性,取值越高随机性越强即相同的问题得到的不同答案的可能性越高。 + en_US: Kernel sampling threshold. Used to determine the randomness of the results. The higher the value, the stronger the randomness, that is, the higher the possibility of getting different answers to the same question. + - name: max_tokens + use_template: max_tokens + default: 2048 + min: 1 + max: 8192 + help: + zh_Hans: 模型回答的tokens的最大长度。 + en_US: 模型回答的tokens的最大长度。 + - name: top_k + label: + zh_Hans: 取样数量 + en_US: Top k + type: int + default: 4 + min: 1 + max: 6 + help: + zh_Hans: 从 k 个候选中随机选择⼀个(⾮等概率)。 + en_US: Randomly select one from k candidates (non-equal probability). + required: false diff --git a/api/core/model_runtime/model_providers/spark/llm/spark-3.yaml b/api/core/model_runtime/model_providers/spark/llm/spark-3.yaml index 10b909df2c..dc0f66f670 100644 --- a/api/core/model_runtime/model_providers/spark/llm/spark-3.yaml +++ b/api/core/model_runtime/model_providers/spark/llm/spark-3.yaml @@ -5,29 +5,29 @@ model_type: llm model_properties: mode: chat parameter_rules: -- name: temperature - use_template: temperature - default: 0.5 - help: - zh_Hans: 核采样阈值。用于决定结果随机性,取值越高随机性越强即相同的问题得到的不同答案的可能性越高。 - en_US: Kernel sampling threshold. Used to determine the randomness of the results. The higher the value, the stronger the randomness, that is, the higher the possibility of getting different answers to the same question. -- name: max_tokens - use_template: max_tokens - default: 2048 - min: 1 - max: 8192 - help: - zh_Hans: 模型回答的tokens的最大长度。 - en_US: 模型回答的tokens的最大长度。 -- name: top_k - label: - zh_Hans: 取样数量 - en_US: Top k - type: int - default: 4 - min: 1 - max: 6 - help: - zh_Hans: 从 k 个候选中随机选择⼀个(⾮等概率)。 - en_US: Randomly select one from k candidates (non-equal probability). - required: false \ No newline at end of file + - name: temperature + use_template: temperature + default: 0.5 + help: + zh_Hans: 核采样阈值。用于决定结果随机性,取值越高随机性越强即相同的问题得到的不同答案的可能性越高。 + en_US: Kernel sampling threshold. Used to determine the randomness of the results. The higher the value, the stronger the randomness, that is, the higher the possibility of getting different answers to the same question. + - name: max_tokens + use_template: max_tokens + default: 2048 + min: 1 + max: 8192 + help: + zh_Hans: 模型回答的tokens的最大长度。 + en_US: 模型回答的tokens的最大长度。 + - name: top_k + label: + zh_Hans: 取样数量 + en_US: Top k + type: int + default: 4 + min: 1 + max: 6 + help: + zh_Hans: 从 k 个候选中随机选择⼀个(⾮等概率)。 + en_US: Randomly select one from k candidates (non-equal probability). + required: false diff --git a/api/core/model_runtime/model_providers/spark/spark.yaml b/api/core/model_runtime/model_providers/spark/spark.yaml index a4f497b9f7..3b07b30f24 100644 --- a/api/core/model_runtime/model_providers/spark/spark.yaml +++ b/api/core/model_runtime/model_providers/spark/spark.yaml @@ -15,32 +15,32 @@ help: url: en_US: https://www.xfyun.cn/solutions/xinghuoAPI supported_model_types: -- llm + - llm configurate_methods: -- predefined-model + - predefined-model provider_credential_schema: credential_form_schemas: - - variable: app_id - label: - en_US: APPID - type: text-input - required: true - placeholder: - zh_Hans: 在此输入您的 APPID - en_US: Enter your APPID - - variable: api_secret - label: - en_US: APISecret - type: secret-input - required: true - placeholder: - zh_Hans: 在此输入您的 APISecret - en_US: Enter your APISecret - - variable: api_key - label: - en_US: APIKey - type: secret-input - required: true - placeholder: - zh_Hans: 在此输入您的 APIKey - en_US: Enter your APIKey + - variable: app_id + label: + en_US: APPID + type: text-input + required: true + placeholder: + zh_Hans: 在此输入您的 APPID + en_US: Enter your APPID + - variable: api_secret + label: + en_US: APISecret + type: secret-input + required: true + placeholder: + zh_Hans: 在此输入您的 APISecret + en_US: Enter your APISecret + - variable: api_key + label: + en_US: APIKey + type: secret-input + required: true + placeholder: + zh_Hans: 在此输入您的 APIKey + en_US: Enter your APIKey diff --git a/api/core/model_runtime/model_providers/togetherai/togetherai.yaml b/api/core/model_runtime/model_providers/togetherai/togetherai.yaml index 5ff525062b..e69471b15d 100644 --- a/api/core/model_runtime/model_providers/togetherai/togetherai.yaml +++ b/api/core/model_runtime/model_providers/togetherai/togetherai.yaml @@ -2,9 +2,9 @@ provider: togetherai label: en_US: together.ai icon_small: - en_US: togetherai_square.svg + en_US: togetherai_square.svg icon_large: - en_US: togetherai.svg + en_US: togetherai.svg background: "#F1EFED" help: title: @@ -13,63 +13,63 @@ help: url: en_US: https://api.together.xyz/ supported_model_types: -- llm + - llm configurate_methods: -- customizable-model + - customizable-model model_credential_schema: model: label: en_US: Model Name zh_Hans: 模型名称 placeholder: - en_US: Enter full model name + en_US: Enter full model name zh_Hans: 输入模型全称 credential_form_schemas: - - variable: api_key - required: true - label: - en_US: API Key - type: secret-input - placeholder: - zh_Hans: 在此输入您的 API Key - en_US: Enter your API Key - - variable: mode - show_on: - - variable: __model_type - value: llm - label: - en_US: Completion mode - type: select - required: false - default: chat - placeholder: - zh_Hans: 选择对话类型 - en_US: Select completion mode - options: - - value: completion - label: - en_US: Completion - zh_Hans: 补全 - - value: chat - label: - en_US: Chat - zh_Hans: 对话 - - variable: context_size - label: - zh_Hans: 模型上下文长度 - en_US: Model context size - required: true - type: text-input - default: '4096' - placeholder: - zh_Hans: 在此输入您的模型上下文长度 - en_US: Enter your Model context size - - variable: max_tokens_to_sample - label: - zh_Hans: 最大 token 上限 - en_US: Upper bound for max tokens - show_on: - - variable: __model_type - value: llm - default: '4096' - type: text-input \ No newline at end of file + - variable: api_key + required: true + label: + en_US: API Key + type: secret-input + placeholder: + zh_Hans: 在此输入您的 API Key + en_US: Enter your API Key + - variable: mode + show_on: + - variable: __model_type + value: llm + label: + en_US: Completion mode + type: select + required: false + default: chat + placeholder: + zh_Hans: 选择对话类型 + en_US: Select completion mode + options: + - value: completion + label: + en_US: Completion + zh_Hans: 补全 + - value: chat + label: + en_US: Chat + zh_Hans: 对话 + - variable: context_size + label: + zh_Hans: 模型上下文长度 + en_US: Model context size + required: true + type: text-input + default: '4096' + placeholder: + zh_Hans: 在此输入您的模型上下文长度 + en_US: Enter your Model context size + - variable: max_tokens_to_sample + label: + zh_Hans: 最大 token 上限 + en_US: Upper bound for max tokens + show_on: + - variable: __model_type + value: llm + default: '4096' + type: text-input diff --git a/api/core/model_runtime/model_providers/tongyi/llm/qwen-plus.yaml b/api/core/model_runtime/model_providers/tongyi/llm/qwen-plus.yaml index 1c93faea8d..e74fb7b252 100644 --- a/api/core/model_runtime/model_providers/tongyi/llm/qwen-plus.yaml +++ b/api/core/model_runtime/model_providers/tongyi/llm/qwen-plus.yaml @@ -6,52 +6,52 @@ model_properties: mode: completion context_size: 32000 parameter_rules: -- name: temperature - use_template: temperature - default: 1.0 - min: 0.0 - max: 2.0 - help: - zh_Hans: 用于控制随机性和多样性的程度。具体来说,temperature值控制了生成文本时对每个候选词的概率分布进行平滑的程度。较高的temperature值会降低概率分布的峰值,使得更多的低概率词被选择,生成结果更加多样化;而较低的temperature值则会增强概率分布的峰值,使得高概率词更容易被选择,生成结果更加确定。 - en_US: Used to control the degree of randomness and diversity. Specifically, the temperature value controls the degree to which the probability distribution of each candidate word is smoothed when generating text. A higher temperature value will reduce the peak value of the probability distribution, allowing more low-probability words to be selected, and the generated results will be more diverse; while a lower temperature value will enhance the peak value of the probability distribution, making it easier for high-probability words to be selected. , the generated results are more certain. -- name: top_p - use_template: top_p - default: 0.8 - help: - zh_Hans: 生成过程中核采样方法概率阈值,例如,取值为0.8时,仅保留概率加起来大于等于0.8的最可能token的最小集合作为候选集。取值范围为(0,1.0),取值越大,生成的随机性越高;取值越低,生成的确定性越高。 - en_US: The probability threshold of the kernel sampling method during the generation process. For example, when the value is 0.8, only the smallest set of the most likely tokens with a sum of probabilities greater than or equal to 0.8 is retained as the candidate set. The value range is (0,1.0). The larger the value, the higher the randomness generated; the lower the value, the higher the certainty generated. -- name: max_tokens - use_template: max_tokens - default: 2000 - min: 1 - max: 2000 - help: - zh_Hans: 用于限制模型生成token的数量,max_tokens设置的是生成上限,并不表示一定会生成这么多的token数量。 - en_US: It is used to limit the number of tokens generated by the model. max_tokens sets the upper limit of generation, which does not mean that so many tokens will be generated. -- name: top_k - label: - zh_Hans: 取样数量 - en_US: Top k - type: int - help: - zh_Hans: 生成时,采样候选集的大小。例如,取值为50时,仅将单次生成中得分最高的50个token组成随机采样的候选集。取值越大,生成的随机性越高;取值越小,生成的确定性越高。默认不传递该参数,取值为None或当top_k大于100时,表示不启用top_k策略,此时,仅有top_p策略生效。 - en_US: The size of the sample candidate set when generated. For example, when the value is 50, only the 50 highest-scoring tokens in a single generation form a randomly sampled candidate set. The larger the value, the higher the randomness generated; the smaller the value, the higher the certainty generated. This parameter is not passed by default. The value is None or when top_k is greater than 100, it means that the top_k policy is not enabled. At this time, only the top_p policy takes effect. - required: false -- name: seed - label: - zh_Hans: 随机种子 - en_US: Random seed - type: int - default: 1234 - help: - zh_Hans: 生成时,随机数的种子,用于控制模型生成的随机性。如果使用相同的种子,每次运行生成的结果都将相同;当需要复现模型的生成结果时,可以使用相同的种子。seed参数支持无符号64位整数类型。默认值 1234。 - en_US: When generating, the random number seed is used to control the randomness of model generation. If you use the same seed, the results generated by each run will be the same; when you need to reproduce the results of the model, you can use the same seed. The seed parameter supports unsigned 64-bit integer types. Default value 1234. - required: false -- name: repetition_penalty - label: - en_US: Repetition penalty - type: float - default: 1.1 - help: - zh_Hans: 用于控制模型生成时的重复度。提高repetition_penalty时可以降低模型生成的重复度。1.0表示不做惩罚。 - en_US: Used to control the repetition of model generation. Increasing the repetition_penalty can reduce the repetition of model generation. 1.0 means no punishment. \ No newline at end of file + - name: temperature + use_template: temperature + default: 1.0 + min: 0.0 + max: 2.0 + help: + zh_Hans: 用于控制随机性和多样性的程度。具体来说,temperature值控制了生成文本时对每个候选词的概率分布进行平滑的程度。较高的temperature值会降低概率分布的峰值,使得更多的低概率词被选择,生成结果更加多样化;而较低的temperature值则会增强概率分布的峰值,使得高概率词更容易被选择,生成结果更加确定。 + en_US: Used to control the degree of randomness and diversity. Specifically, the temperature value controls the degree to which the probability distribution of each candidate word is smoothed when generating text. A higher temperature value will reduce the peak value of the probability distribution, allowing more low-probability words to be selected, and the generated results will be more diverse; while a lower temperature value will enhance the peak value of the probability distribution, making it easier for high-probability words to be selected. , the generated results are more certain. + - name: top_p + use_template: top_p + default: 0.8 + help: + zh_Hans: 生成过程中核采样方法概率阈值,例如,取值为0.8时,仅保留概率加起来大于等于0.8的最可能token的最小集合作为候选集。取值范围为(0,1.0),取值越大,生成的随机性越高;取值越低,生成的确定性越高。 + en_US: The probability threshold of the kernel sampling method during the generation process. For example, when the value is 0.8, only the smallest set of the most likely tokens with a sum of probabilities greater than or equal to 0.8 is retained as the candidate set. The value range is (0,1.0). The larger the value, the higher the randomness generated; the lower the value, the higher the certainty generated. + - name: max_tokens + use_template: max_tokens + default: 2000 + min: 1 + max: 2000 + help: + zh_Hans: 用于限制模型生成token的数量,max_tokens设置的是生成上限,并不表示一定会生成这么多的token数量。 + en_US: It is used to limit the number of tokens generated by the model. max_tokens sets the upper limit of generation, which does not mean that so many tokens will be generated. + - name: top_k + label: + zh_Hans: 取样数量 + en_US: Top k + type: int + help: + zh_Hans: 生成时,采样候选集的大小。例如,取值为50时,仅将单次生成中得分最高的50个token组成随机采样的候选集。取值越大,生成的随机性越高;取值越小,生成的确定性越高。默认不传递该参数,取值为None或当top_k大于100时,表示不启用top_k策略,此时,仅有top_p策略生效。 + en_US: The size of the sample candidate set when generated. For example, when the value is 50, only the 50 highest-scoring tokens in a single generation form a randomly sampled candidate set. The larger the value, the higher the randomness generated; the smaller the value, the higher the certainty generated. This parameter is not passed by default. The value is None or when top_k is greater than 100, it means that the top_k policy is not enabled. At this time, only the top_p policy takes effect. + required: false + - name: seed + label: + zh_Hans: 随机种子 + en_US: Random seed + type: int + default: 1234 + help: + zh_Hans: 生成时,随机数的种子,用于控制模型生成的随机性。如果使用相同的种子,每次运行生成的结果都将相同;当需要复现模型的生成结果时,可以使用相同的种子。seed参数支持无符号64位整数类型。默认值 1234。 + en_US: When generating, the random number seed is used to control the randomness of model generation. If you use the same seed, the results generated by each run will be the same; when you need to reproduce the results of the model, you can use the same seed. The seed parameter supports unsigned 64-bit integer types. Default value 1234. + required: false + - name: repetition_penalty + label: + en_US: Repetition penalty + type: float + default: 1.1 + help: + zh_Hans: 用于控制模型生成时的重复度。提高repetition_penalty时可以降低模型生成的重复度。1.0表示不做惩罚。 + en_US: Used to control the repetition of model generation. Increasing the repetition_penalty can reduce the repetition of model generation. 1.0 means no punishment. diff --git a/api/core/model_runtime/model_providers/tongyi/llm/qwen-turbo.yaml b/api/core/model_runtime/model_providers/tongyi/llm/qwen-turbo.yaml index c505c65344..8507881f48 100644 --- a/api/core/model_runtime/model_providers/tongyi/llm/qwen-turbo.yaml +++ b/api/core/model_runtime/model_providers/tongyi/llm/qwen-turbo.yaml @@ -6,53 +6,53 @@ model_properties: mode: completion context_size: 8192 parameter_rules: -- name: temperature - use_template: temperature - default: 1.0 - min: 0.0 - max: 2.0 - help: - zh_Hans: 用于控制随机性和多样性的程度。具体来说,temperature值控制了生成文本时对每个候选词的概率分布进行平滑的程度。较高的temperature值会降低概率分布的峰值,使得更多的低概率词被选择,生成结果更加多样化;而较低的temperature值则会增强概率分布的峰值,使得高概率词更容易被选择,生成结果更加确定。 - en_US: Used to control the degree of randomness and diversity. Specifically, the temperature value controls the degree to which the probability distribution of each candidate word is smoothed when generating text. A higher temperature value will reduce the peak value of the probability distribution, allowing more low-probability words to be selected, and the generated results will be more diverse; while a lower temperature value will enhance the peak value of the probability distribution, making it easier for high-probability words to be selected. , the generated results are more certain. -- name: top_p - use_template: top_p - default: 0.8 - help: - zh_Hans: 生成过程中核采样方法概率阈值,例如,取值为0.8时,仅保留概率加起来大于等于0.8的最可能token的最小集合作为候选集。取值范围为(0,1.0),取值越大,生成的随机性越高;取值越低,生成的确定性越高。 - en_US: The probability threshold of the kernel sampling method during the generation process. For example, when the value is 0.8, only the smallest set of the most likely tokens with a sum of probabilities greater than or equal to 0.8 is retained as the candidate set. The value range is (0,1.0). The larger the value, the higher the randomness generated; the lower the value, the higher the certainty generated. -- name: max_tokens - use_template: max_tokens - default: 1500 - min: 1 - max: 1500 - help: - zh_Hans: 用于限制模型生成token的数量,max_tokens设置的是生成上限,并不表示一定会生成这么多的token数量。 - en_US: It is used to limit the number of tokens generated by the model. max_tokens sets the upper limit of generation, which does not mean that so many tokens will be generated. -- name: top_k - label: - zh_Hans: 取样数量 - en_US: Top k - type: int - help: - zh_Hans: 生成时,采样候选集的大小。例如,取值为50时,仅将单次生成中得分最高的50个token组成随机采样的候选集。取值越大,生成的随机性越高;取值越小,生成的确定性越高。默认不传递该参数,取值为None或当top_k大于100时,表示不启用top_k策略,此时,仅有top_p策略生效。 - en_US: The size of the sample candidate set when generated. For example, when the value is 50, only the 50 highest-scoring tokens in a single generation form a randomly sampled candidate set. The larger the value, the higher the randomness generated; the smaller the value, the higher the certainty generated. This parameter is not passed by default. The value is None or when top_k is greater than 100, it means that the top_k policy is not enabled. At this time, only the top_p policy takes effect. - required: false -- name: seed - label: - zh_Hans: 随机种子 - en_US: Random seed - type: int - default: 1234 - help: - zh_Hans: 生成时,随机数的种子,用于控制模型生成的随机性。如果使用相同的种子,每次运行生成的结果都将相同;当需要复现模型的生成结果时,可以使用相同的种子。seed参数支持无符号64位整数类型。默认值 1234。 - en_US: When generating, the random number seed is used to control the randomness of model generation. If you use the same seed, the results generated by each run will be the same; when you need to reproduce the results of the model, you can use the same seed. The seed parameter supports unsigned 64-bit integer types. Default value 1234. - required: false -- name: repetition_penalty - label: - en_US: Repetition penalty - type: float - default: 1.1 - help: - zh_Hans: 用于控制模型生成时的重复度。提高repetition_penalty时可以降低模型生成的重复度。1.0表示不做惩罚。 - en_US: Used to control the repetition of model generation. Increasing the repetition_penalty can reduce the repetition of model generation. 1.0 means no punishment. - required: false \ No newline at end of file + - name: temperature + use_template: temperature + default: 1.0 + min: 0.0 + max: 2.0 + help: + zh_Hans: 用于控制随机性和多样性的程度。具体来说,temperature值控制了生成文本时对每个候选词的概率分布进行平滑的程度。较高的temperature值会降低概率分布的峰值,使得更多的低概率词被选择,生成结果更加多样化;而较低的temperature值则会增强概率分布的峰值,使得高概率词更容易被选择,生成结果更加确定。 + en_US: Used to control the degree of randomness and diversity. Specifically, the temperature value controls the degree to which the probability distribution of each candidate word is smoothed when generating text. A higher temperature value will reduce the peak value of the probability distribution, allowing more low-probability words to be selected, and the generated results will be more diverse; while a lower temperature value will enhance the peak value of the probability distribution, making it easier for high-probability words to be selected. , the generated results are more certain. + - name: top_p + use_template: top_p + default: 0.8 + help: + zh_Hans: 生成过程中核采样方法概率阈值,例如,取值为0.8时,仅保留概率加起来大于等于0.8的最可能token的最小集合作为候选集。取值范围为(0,1.0),取值越大,生成的随机性越高;取值越低,生成的确定性越高。 + en_US: The probability threshold of the kernel sampling method during the generation process. For example, when the value is 0.8, only the smallest set of the most likely tokens with a sum of probabilities greater than or equal to 0.8 is retained as the candidate set. The value range is (0,1.0). The larger the value, the higher the randomness generated; the lower the value, the higher the certainty generated. + - name: max_tokens + use_template: max_tokens + default: 1500 + min: 1 + max: 1500 + help: + zh_Hans: 用于限制模型生成token的数量,max_tokens设置的是生成上限,并不表示一定会生成这么多的token数量。 + en_US: It is used to limit the number of tokens generated by the model. max_tokens sets the upper limit of generation, which does not mean that so many tokens will be generated. + - name: top_k + label: + zh_Hans: 取样数量 + en_US: Top k + type: int + help: + zh_Hans: 生成时,采样候选集的大小。例如,取值为50时,仅将单次生成中得分最高的50个token组成随机采样的候选集。取值越大,生成的随机性越高;取值越小,生成的确定性越高。默认不传递该参数,取值为None或当top_k大于100时,表示不启用top_k策略,此时,仅有top_p策略生效。 + en_US: The size of the sample candidate set when generated. For example, when the value is 50, only the 50 highest-scoring tokens in a single generation form a randomly sampled candidate set. The larger the value, the higher the randomness generated; the smaller the value, the higher the certainty generated. This parameter is not passed by default. The value is None or when top_k is greater than 100, it means that the top_k policy is not enabled. At this time, only the top_p policy takes effect. + required: false + - name: seed + label: + zh_Hans: 随机种子 + en_US: Random seed + type: int + default: 1234 + help: + zh_Hans: 生成时,随机数的种子,用于控制模型生成的随机性。如果使用相同的种子,每次运行生成的结果都将相同;当需要复现模型的生成结果时,可以使用相同的种子。seed参数支持无符号64位整数类型。默认值 1234。 + en_US: When generating, the random number seed is used to control the randomness of model generation. If you use the same seed, the results generated by each run will be the same; when you need to reproduce the results of the model, you can use the same seed. The seed parameter supports unsigned 64-bit integer types. Default value 1234. + required: false + - name: repetition_penalty + label: + en_US: Repetition penalty + type: float + default: 1.1 + help: + zh_Hans: 用于控制模型生成时的重复度。提高repetition_penalty时可以降低模型生成的重复度。1.0表示不做惩罚。 + en_US: Used to control the repetition of model generation. Increasing the repetition_penalty can reduce the repetition of model generation. 1.0 means no punishment. + required: false diff --git a/api/core/model_runtime/model_providers/tongyi/tongyi.yaml b/api/core/model_runtime/model_providers/tongyi/tongyi.yaml index cfb46368cb..786d687ad2 100644 --- a/api/core/model_runtime/model_providers/tongyi/tongyi.yaml +++ b/api/core/model_runtime/model_providers/tongyi/tongyi.yaml @@ -15,16 +15,16 @@ help: url: en_US: https://dashscope.console.aliyun.com/api-key_management supported_model_types: -- llm + - llm configurate_methods: -- predefined-model + - predefined-model provider_credential_schema: credential_form_schemas: - - variable: dashscope_api_key - label: - en_US: APIKey - type: secret-input - required: true - placeholder: - zh_Hans: 在此输入您的 APIKey - en_US: Enter your APIKey + - variable: dashscope_api_key + label: + en_US: APIKey + type: secret-input + required: true + placeholder: + zh_Hans: 在此输入您的 APIKey + en_US: Enter your APIKey diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-4.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-4.yaml index 7f5693e826..0439506817 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-4.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-4.yaml @@ -3,34 +3,34 @@ label: en_US: Ernie Bot 4 model_type: llm features: -- agent-thought + - agent-thought model_properties: mode: chat context_size: 4800 parameter_rules: -- name: temperature - use_template: temperature - min: 0.1 - max: 1.0 - default: 0.8 -- name: top_p - use_template: top_p -- name: max_tokens - use_template: max_tokens - required: true - default: 256 - min: 1 - max: 4800 -- name: presence_penalty - use_template: presence_penalty -- name: frequency_penalty - use_template: frequency_penalty -- name: disable_search - label: - zh_Hans: 禁用搜索 - en_US: Disable Search - type: boolean - help: - zh_Hans: 禁用模型自行进行外部搜索。 - en_US: Disable the model to perform external search. - required: false \ No newline at end of file + - name: temperature + use_template: temperature + min: 0.1 + max: 1.0 + default: 0.8 + - name: top_p + use_template: top_p + - name: max_tokens + use_template: max_tokens + required: true + default: 256 + min: 1 + max: 4800 + - name: presence_penalty + use_template: presence_penalty + - name: frequency_penalty + use_template: frequency_penalty + - name: disable_search + label: + zh_Hans: 禁用搜索 + en_US: Disable Search + type: boolean + help: + zh_Hans: 禁用模型自行进行外部搜索。 + en_US: Disable the model to perform external search. + required: false diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-8k.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-8k.yaml index 29dfbf261b..fe06eb9975 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-8k.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-8k.yaml @@ -3,34 +3,34 @@ label: en_US: Ernie Bot 8k model_type: llm features: -- agent-thought + - agent-thought model_properties: mode: chat context_size: 8000 parameter_rules: -- name: temperature - use_template: temperature - min: 0.1 - max: 1.0 - default: 0.8 -- name: top_p - use_template: top_p -- name: max_tokens - use_template: max_tokens - required: true - default: 1024 - min: 1 - max: 8000 -- name: presence_penalty - use_template: presence_penalty -- name: frequency_penalty - use_template: frequency_penalty -- name: disable_search - label: - zh_Hans: 禁用搜索 - en_US: Disable Search - type: boolean - help: - zh_Hans: 禁用模型自行进行外部搜索。 - en_US: Disable the model to perform external search. - required: false \ No newline at end of file + - name: temperature + use_template: temperature + min: 0.1 + max: 1.0 + default: 0.8 + - name: top_p + use_template: top_p + - name: max_tokens + use_template: max_tokens + required: true + default: 1024 + min: 1 + max: 8000 + - name: presence_penalty + use_template: presence_penalty + - name: frequency_penalty + use_template: frequency_penalty + - name: disable_search + label: + zh_Hans: 禁用搜索 + en_US: Disable Search + type: boolean + help: + zh_Hans: 禁用模型自行进行外部搜索。 + en_US: Disable the model to perform external search. + required: false diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-turbo.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-turbo.yaml index cb7553304e..bcd9d1235b 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-turbo.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-turbo.yaml @@ -3,25 +3,25 @@ label: en_US: Ernie Bot Turbo model_type: llm features: -- agent-thought + - agent-thought model_properties: mode: chat context_size: 11200 parameter_rules: -- name: temperature - use_template: temperature - min: 0.1 - max: 1.0 - default: 0.8 -- name: top_p - use_template: top_p -- name: max_tokens - use_template: max_tokens - required: true - default: 1024 - min: 1 - max: 11200 -- name: presence_penalty - use_template: presence_penalty -- name: frequency_penalty - use_template: frequency_penalty \ No newline at end of file + - name: temperature + use_template: temperature + min: 0.1 + max: 1.0 + default: 0.8 + - name: top_p + use_template: top_p + - name: max_tokens + use_template: max_tokens + required: true + default: 1024 + min: 1 + max: 11200 + - name: presence_penalty + use_template: presence_penalty + - name: frequency_penalty + use_template: frequency_penalty diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot.yaml index 682eba9e18..75fb3b1942 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot.yaml @@ -3,34 +3,34 @@ label: en_US: Ernie Bot model_type: llm features: -- agent-thought + - agent-thought model_properties: mode: chat context_size: 4800 parameter_rules: -- name: temperature - use_template: temperature - min: 0.1 - max: 1.0 - default: 0.8 -- name: top_p - use_template: top_p -- name: max_tokens - use_template: max_tokens - required: true - default: 256 - min: 1 - max: 4800 -- name: presence_penalty - use_template: presence_penalty -- name: frequency_penalty - use_template: frequency_penalty -- name: disable_search - label: - zh_Hans: 禁用搜索 - en_US: Disable Search - type: boolean - help: - zh_Hans: 禁用模型自行进行外部搜索。 - en_US: Disable the model to perform external search. - required: false \ No newline at end of file + - name: temperature + use_template: temperature + min: 0.1 + max: 1.0 + default: 0.8 + - name: top_p + use_template: top_p + - name: max_tokens + use_template: max_tokens + required: true + default: 256 + min: 1 + max: 4800 + - name: presence_penalty + use_template: presence_penalty + - name: frequency_penalty + use_template: frequency_penalty + - name: disable_search + label: + zh_Hans: 禁用搜索 + en_US: Disable Search + type: boolean + help: + zh_Hans: 禁用模型自行进行外部搜索。 + en_US: Disable the model to perform external search. + required: false diff --git a/api/core/model_runtime/model_providers/wenxin/wenxin.yaml b/api/core/model_runtime/model_providers/wenxin/wenxin.yaml index 76042bb184..b3a1f60824 100644 --- a/api/core/model_runtime/model_providers/wenxin/wenxin.yaml +++ b/api/core/model_runtime/model_providers/wenxin/wenxin.yaml @@ -16,24 +16,24 @@ help: url: en_US: https://cloud.baidu.com/wenxin.html supported_model_types: -- llm + - llm configurate_methods: -- predefined-model + - predefined-model provider_credential_schema: credential_form_schemas: - - variable: api_key - label: - en_US: API Key - type: secret-input - required: true - placeholder: - zh_Hans: 在此输入您的 API Key - en_US: Enter your API Key - - variable: secret_key - label: - en_US: Secret Key - type: secret-input - required: true - placeholder: - zh_Hans: 在此输入您的 Secret Key - en_US: Enter your Secret Key \ No newline at end of file + - variable: api_key + label: + en_US: API Key + type: secret-input + required: true + placeholder: + zh_Hans: 在此输入您的 API Key + en_US: Enter your API Key + - variable: secret_key + label: + en_US: Secret Key + type: secret-input + required: true + placeholder: + zh_Hans: 在此输入您的 Secret Key + en_US: Enter your Secret Key diff --git a/api/core/model_runtime/model_providers/xinference/xinference.yaml b/api/core/model_runtime/model_providers/xinference/xinference.yaml index d4e06ab516..f5391d0324 100644 --- a/api/core/model_runtime/model_providers/xinference/xinference.yaml +++ b/api/core/model_runtime/model_providers/xinference/xinference.yaml @@ -13,11 +13,11 @@ help: url: en_US: https://github.com/xorbitsai/inference supported_model_types: -- llm -- text-embedding -- rerank + - llm + - text-embedding + - rerank configurate_methods: -- customizable-model + - customizable-model model_credential_schema: model: label: @@ -27,21 +27,21 @@ model_credential_schema: en_US: Enter your model name zh_Hans: 输入模型名称 credential_form_schemas: - - variable: server_url - label: - zh_Hans: 服务器URL - en_US: Server url - type: secret-input - required: true - placeholder: - zh_Hans: 在此输入Xinference的服务器地址,如 https://example.com/xxx - en_US: Enter the url of your Xinference, for example https://example.com/xxx - - variable: model_uid - label: - zh_Hans: 模型UID - en_US: Model uid - type: text-input - required: true - placeholder: - zh_Hans: 在此输入您的Model UID - en_US: Enter the model uid \ No newline at end of file + - variable: server_url + label: + zh_Hans: 服务器URL + en_US: Server url + type: secret-input + required: true + placeholder: + zh_Hans: 在此输入Xinference的服务器地址,如 https://example.com/xxx + en_US: Enter the url of your Xinference, for example https://example.com/xxx + - variable: model_uid + label: + zh_Hans: 模型UID + en_US: Model uid + type: text-input + required: true + placeholder: + zh_Hans: 在此输入您的Model UID + en_US: Enter the model uid diff --git a/api/core/model_runtime/model_providers/zhipuai/llm/chatglm_lite.yaml b/api/core/model_runtime/model_providers/zhipuai/llm/chatglm_lite.yaml index 3731d7ec6c..9778de1a2e 100644 --- a/api/core/model_runtime/model_providers/zhipuai/llm/chatglm_lite.yaml +++ b/api/core/model_runtime/model_providers/zhipuai/llm/chatglm_lite.yaml @@ -5,18 +5,18 @@ model_type: llm model_properties: mode: chat parameter_rules: -- name: temperature - use_template: temperature - default: 0.9 - min: 0.0 - max: 1.0 - help: - zh_Hans: 采样温度,控制输出的随机性,必须为正数取值范围是:(0.0,1.0],不能等于 0,默认值为 0.95 值越大,会使输出更随机,更具创造性;值越小,输出会更加稳定或确定建议您根据应用场景调整 top_p 或 temperature 参数,但不要同时调整两个参数。 - en_US: Sampling temperature, controls the randomness of the output, must be a positive number. The value range is (0.0,1.0], which cannot be equal to 0. The default value is 0.95. The larger the value, the more random and creative the output will be; the smaller the value, The output will be more stable or certain. It is recommended that you adjust the top_p or temperature parameters according to the application scenario, but do not adjust both parameters at the same time. -- name: top_p - use_template: top_p - default: 0.7 - help: - zh_Hans: 用温度取样的另一种方法,称为核取样取值范围是:(0.0, 1.0) 开区间,不能等于 0 或 1,默认值为 0.7 模型考虑具有 top_p 概率质量tokens的结果例如:0.1 意味着模型解码器只考虑从前 10% 的概率的候选集中取 tokens 建议您根据应用场景调整 top_p 或 temperature 参数,但不要同时调整两个参数。 - en_US: Another method of temperature sampling is called kernel sampling. The value range is (0.0, 1.0) open interval, which cannot be equal to 0 or 1. The default value is 0.7. The model considers the results with top_p probability mass tokens. For example 0.1 means The model decoder only considers tokens from the candidate set with the top 10% probability. It is recommended that you adjust the top_p or temperature parameters according to the application scenario, but do not adjust both parameters at the same time. -deprecated: true \ No newline at end of file + - name: temperature + use_template: temperature + default: 0.9 + min: 0.0 + max: 1.0 + help: + zh_Hans: 采样温度,控制输出的随机性,必须为正数取值范围是:(0.0,1.0],不能等于 0,默认值为 0.95 值越大,会使输出更随机,更具创造性;值越小,输出会更加稳定或确定建议您根据应用场景调整 top_p 或 temperature 参数,但不要同时调整两个参数。 + en_US: Sampling temperature, controls the randomness of the output, must be a positive number. The value range is (0.0,1.0], which cannot be equal to 0. The default value is 0.95. The larger the value, the more random and creative the output will be; the smaller the value, The output will be more stable or certain. It is recommended that you adjust the top_p or temperature parameters according to the application scenario, but do not adjust both parameters at the same time. + - name: top_p + use_template: top_p + default: 0.7 + help: + zh_Hans: 用温度取样的另一种方法,称为核取样取值范围是:(0.0, 1.0) 开区间,不能等于 0 或 1,默认值为 0.7 模型考虑具有 top_p 概率质量tokens的结果例如:0.1 意味着模型解码器只考虑从前 10% 的概率的候选集中取 tokens 建议您根据应用场景调整 top_p 或 temperature 参数,但不要同时调整两个参数。 + en_US: Another method of temperature sampling is called kernel sampling. The value range is (0.0, 1.0) open interval, which cannot be equal to 0 or 1. The default value is 0.7. The model considers the results with top_p probability mass tokens. For example 0.1 means The model decoder only considers tokens from the candidate set with the top 10% probability. It is recommended that you adjust the top_p or temperature parameters according to the application scenario, but do not adjust both parameters at the same time. +deprecated: true diff --git a/api/core/model_runtime/model_providers/zhipuai/llm/chatglm_lite_32k.yaml b/api/core/model_runtime/model_providers/zhipuai/llm/chatglm_lite_32k.yaml index 41bb0a276c..7836d964c6 100644 --- a/api/core/model_runtime/model_providers/zhipuai/llm/chatglm_lite_32k.yaml +++ b/api/core/model_runtime/model_providers/zhipuai/llm/chatglm_lite_32k.yaml @@ -5,18 +5,18 @@ model_type: llm model_properties: mode: chat parameter_rules: -- name: temperature - use_template: temperature - default: 0.9 - min: 0.0 - max: 1.0 - help: - zh_Hans: 采样温度,控制输出的随机性,必须为正数取值范围是:(0.0,1.0],不能等于 0,默认值为 0.95 值越大,会使输出更随机,更具创造性;值越小,输出会更加稳定或确定建议您根据应用场景调整 top_p 或 temperature 参数,但不要同时调整两个参数。 - en_US: Sampling temperature, controls the randomness of the output, must be a positive number. The value range is (0.0,1.0], which cannot be equal to 0. The default value is 0.95. The larger the value, the more random and creative the output will be; the smaller the value, The output will be more stable or certain. It is recommended that you adjust the top_p or temperature parameters according to the application scenario, but do not adjust both parameters at the same time. -- name: top_p - use_template: top_p - default: 0.7 - help: - zh_Hans: 用温度取样的另一种方法,称为核取样取值范围是:(0.0, 1.0) 开区间,不能等于 0 或 1,默认值为 0.7 模型考虑具有 top_p 概率质量tokens的结果例如:0.1 意味着模型解码器只考虑从前 10% 的概率的候选集中取 tokens 建议您根据应用场景调整 top_p 或 temperature 参数,但不要同时调整两个参数。 - en_US: Another method of temperature sampling is called kernel sampling. The value range is (0.0, 1.0) open interval, which cannot be equal to 0 or 1. The default value is 0.7. The model considers the results with top_p probability mass tokens. For example 0.1 means The model decoder only considers tokens from the candidate set with the top 10% probability. It is recommended that you adjust the top_p or temperature parameters according to the application scenario, but do not adjust both parameters at the same time. -deprecated: true \ No newline at end of file + - name: temperature + use_template: temperature + default: 0.9 + min: 0.0 + max: 1.0 + help: + zh_Hans: 采样温度,控制输出的随机性,必须为正数取值范围是:(0.0,1.0],不能等于 0,默认值为 0.95 值越大,会使输出更随机,更具创造性;值越小,输出会更加稳定或确定建议您根据应用场景调整 top_p 或 temperature 参数,但不要同时调整两个参数。 + en_US: Sampling temperature, controls the randomness of the output, must be a positive number. The value range is (0.0,1.0], which cannot be equal to 0. The default value is 0.95. The larger the value, the more random and creative the output will be; the smaller the value, The output will be more stable or certain. It is recommended that you adjust the top_p or temperature parameters according to the application scenario, but do not adjust both parameters at the same time. + - name: top_p + use_template: top_p + default: 0.7 + help: + zh_Hans: 用温度取样的另一种方法,称为核取样取值范围是:(0.0, 1.0) 开区间,不能等于 0 或 1,默认值为 0.7 模型考虑具有 top_p 概率质量tokens的结果例如:0.1 意味着模型解码器只考虑从前 10% 的概率的候选集中取 tokens 建议您根据应用场景调整 top_p 或 temperature 参数,但不要同时调整两个参数。 + en_US: Another method of temperature sampling is called kernel sampling. The value range is (0.0, 1.0) open interval, which cannot be equal to 0 or 1. The default value is 0.7. The model considers the results with top_p probability mass tokens. For example 0.1 means The model decoder only considers tokens from the candidate set with the top 10% probability. It is recommended that you adjust the top_p or temperature parameters according to the application scenario, but do not adjust both parameters at the same time. +deprecated: true diff --git a/api/core/model_runtime/model_providers/zhipuai/llm/chatglm_pro.yaml b/api/core/model_runtime/model_providers/zhipuai/llm/chatglm_pro.yaml index 1aa5bbba0d..b3d53c812b 100644 --- a/api/core/model_runtime/model_providers/zhipuai/llm/chatglm_pro.yaml +++ b/api/core/model_runtime/model_providers/zhipuai/llm/chatglm_pro.yaml @@ -5,18 +5,18 @@ model_type: llm model_properties: mode: chat parameter_rules: -- name: temperature - use_template: temperature - default: 0.9 - min: 0.0 - max: 1.0 - help: - zh_Hans: 采样温度,控制输出的随机性,必须为正数取值范围是:(0.0,1.0],不能等于 0,默认值为 0.95 值越大,会使输出更随机,更具创造性;值越小,输出会更加稳定或确定建议您根据应用场景调整 top_p 或 temperature 参数,但不要同时调整两个参数。 - en_US: Sampling temperature, controls the randomness of the output, must be a positive number. The value range is (0.0,1.0], which cannot be equal to 0. The default value is 0.95. The larger the value, the more random and creative the output will be; the smaller the value, The output will be more stable or certain. It is recommended that you adjust the top_p or temperature parameters according to the application scenario, but do not adjust both parameters at the same time. -- name: top_p - use_template: top_p - default: 0.7 - help: - zh_Hans: 用温度取样的另一种方法,称为核取样取值范围是:(0.0, 1.0) 开区间,不能等于 0 或 1,默认值为 0.7 模型考虑具有 top_p 概率质量tokens的结果例如:0.1 意味着模型解码器只考虑从前 10% 的概率的候选集中取 tokens 建议您根据应用场景调整 top_p 或 temperature 参数,但不要同时调整两个参数。 - en_US: Another method of temperature sampling is called kernel sampling. The value range is (0.0, 1.0) open interval, which cannot be equal to 0 or 1. The default value is 0.7. The model considers the results with top_p probability mass tokens. For example 0.1 means The model decoder only considers tokens from the candidate set with the top 10% probability. It is recommended that you adjust the top_p or temperature parameters according to the application scenario, but do not adjust both parameters at the same time. -deprecated: true \ No newline at end of file + - name: temperature + use_template: temperature + default: 0.9 + min: 0.0 + max: 1.0 + help: + zh_Hans: 采样温度,控制输出的随机性,必须为正数取值范围是:(0.0,1.0],不能等于 0,默认值为 0.95 值越大,会使输出更随机,更具创造性;值越小,输出会更加稳定或确定建议您根据应用场景调整 top_p 或 temperature 参数,但不要同时调整两个参数。 + en_US: Sampling temperature, controls the randomness of the output, must be a positive number. The value range is (0.0,1.0], which cannot be equal to 0. The default value is 0.95. The larger the value, the more random and creative the output will be; the smaller the value, The output will be more stable or certain. It is recommended that you adjust the top_p or temperature parameters according to the application scenario, but do not adjust both parameters at the same time. + - name: top_p + use_template: top_p + default: 0.7 + help: + zh_Hans: 用温度取样的另一种方法,称为核取样取值范围是:(0.0, 1.0) 开区间,不能等于 0 或 1,默认值为 0.7 模型考虑具有 top_p 概率质量tokens的结果例如:0.1 意味着模型解码器只考虑从前 10% 的概率的候选集中取 tokens 建议您根据应用场景调整 top_p 或 temperature 参数,但不要同时调整两个参数。 + en_US: Another method of temperature sampling is called kernel sampling. The value range is (0.0, 1.0) open interval, which cannot be equal to 0 or 1. The default value is 0.7. The model considers the results with top_p probability mass tokens. For example 0.1 means The model decoder only considers tokens from the candidate set with the top 10% probability. It is recommended that you adjust the top_p or temperature parameters according to the application scenario, but do not adjust both parameters at the same time. +deprecated: true diff --git a/api/core/model_runtime/model_providers/zhipuai/llm/chatglm_std.yaml b/api/core/model_runtime/model_providers/zhipuai/llm/chatglm_std.yaml index aabbe5b5aa..7d8b9520a0 100644 --- a/api/core/model_runtime/model_providers/zhipuai/llm/chatglm_std.yaml +++ b/api/core/model_runtime/model_providers/zhipuai/llm/chatglm_std.yaml @@ -5,18 +5,18 @@ model_type: llm model_properties: mode: chat parameter_rules: -- name: temperature - use_template: temperature - default: 0.9 - min: 0.0 - max: 1.0 - help: - zh_Hans: 采样温度,控制输出的随机性,必须为正数取值范围是:(0.0,1.0],不能等于 0,默认值为 0.95 值越大,会使输出更随机,更具创造性;值越小,输出会更加稳定或确定建议您根据应用场景调整 top_p 或 temperature 参数,但不要同时调整两个参数。 - en_US: Sampling temperature, controls the randomness of the output, must be a positive number. The value range is (0.0,1.0], which cannot be equal to 0. The default value is 0.95. The larger the value, the more random and creative the output will be; the smaller the value, The output will be more stable or certain. It is recommended that you adjust the top_p or temperature parameters according to the application scenario, but do not adjust both parameters at the same time. -- name: top_p - use_template: top_p - default: 0.7 - help: - zh_Hans: 用温度取样的另一种方法,称为核取样取值范围是:(0.0, 1.0) 开区间,不能等于 0 或 1,默认值为 0.7 模型考虑具有 top_p 概率质量tokens的结果例如:0.1 意味着模型解码器只考虑从前 10% 的概率的候选集中取 tokens 建议您根据应用场景调整 top_p 或 temperature 参数,但不要同时调整两个参数。 - en_US: Another method of temperature sampling is called kernel sampling. The value range is (0.0, 1.0) open interval, which cannot be equal to 0 or 1. The default value is 0.7. The model considers the results with top_p probability mass tokens. For example 0.1 means The model decoder only considers tokens from the candidate set with the top 10% probability. It is recommended that you adjust the top_p or temperature parameters according to the application scenario, but do not adjust both parameters at the same time. -deprecated: true \ No newline at end of file + - name: temperature + use_template: temperature + default: 0.9 + min: 0.0 + max: 1.0 + help: + zh_Hans: 采样温度,控制输出的随机性,必须为正数取值范围是:(0.0,1.0],不能等于 0,默认值为 0.95 值越大,会使输出更随机,更具创造性;值越小,输出会更加稳定或确定建议您根据应用场景调整 top_p 或 temperature 参数,但不要同时调整两个参数。 + en_US: Sampling temperature, controls the randomness of the output, must be a positive number. The value range is (0.0,1.0], which cannot be equal to 0. The default value is 0.95. The larger the value, the more random and creative the output will be; the smaller the value, The output will be more stable or certain. It is recommended that you adjust the top_p or temperature parameters according to the application scenario, but do not adjust both parameters at the same time. + - name: top_p + use_template: top_p + default: 0.7 + help: + zh_Hans: 用温度取样的另一种方法,称为核取样取值范围是:(0.0, 1.0) 开区间,不能等于 0 或 1,默认值为 0.7 模型考虑具有 top_p 概率质量tokens的结果例如:0.1 意味着模型解码器只考虑从前 10% 的概率的候选集中取 tokens 建议您根据应用场景调整 top_p 或 temperature 参数,但不要同时调整两个参数。 + en_US: Another method of temperature sampling is called kernel sampling. The value range is (0.0, 1.0) open interval, which cannot be equal to 0 or 1. The default value is 0.7. The model considers the results with top_p probability mass tokens. For example 0.1 means The model decoder only considers tokens from the candidate set with the top 10% probability. It is recommended that you adjust the top_p or temperature parameters according to the application scenario, but do not adjust both parameters at the same time. +deprecated: true diff --git a/api/core/model_runtime/model_providers/zhipuai/llm/chatglm_turbo.yaml b/api/core/model_runtime/model_providers/zhipuai/llm/chatglm_turbo.yaml index 211017ca37..8f51f80967 100644 --- a/api/core/model_runtime/model_providers/zhipuai/llm/chatglm_turbo.yaml +++ b/api/core/model_runtime/model_providers/zhipuai/llm/chatglm_turbo.yaml @@ -5,38 +5,38 @@ model_type: llm model_properties: mode: chat parameter_rules: -- name: temperature - use_template: temperature - default: 0.95 - min: 0.0 - max: 1.0 - help: - zh_Hans: 采样温度,控制输出的随机性,必须为正数取值范围是:(0.0,1.0],不能等于 0,默认值为 0.95 值越大,会使输出更随机,更具创造性;值越小,输出会更加稳定或确定建议您根据应用场景调整 top_p 或 temperature 参数,但不要同时调整两个参数。 - en_US: Sampling temperature, controls the randomness of the output, must be a positive number. The value range is (0.0,1.0], which cannot be equal to 0. The default value is 0.95. The larger the value, the more random and creative the output will be; the smaller the value, The output will be more stable or certain. It is recommended that you adjust the top_p or temperature parameters according to the application scenario, but do not adjust both parameters at the same time. -- name: top_p - use_template: top_p - default: 0.7 - help: - zh_Hans: 用温度取样的另一种方法,称为核取样取值范围是:(0.0, 1.0) 开区间,不能等于 0 或 1,默认值为 0.7 模型考虑具有 top_p 概率质量tokens的结果例如:0.1 意味着模型解码器只考虑从前 10% 的概率的候选集中取 tokens 建议您根据应用场景调整 top_p 或 temperature 参数,但不要同时调整两个参数。 - en_US: Another method of temperature sampling is called kernel sampling. The value range is (0.0, 1.0) open interval, which cannot be equal to 0 or 1. The default value is 0.7. The model considers the results with top_p probability mass tokens. For example 0.1 means The model decoder only considers tokens from the candidate set with the top 10% probability. It is recommended that you adjust the top_p or temperature parameters according to the application scenario, but do not adjust both parameters at the same time. -- name: incremental - label: - zh_Hans: 增量返回 - en_US: Incremental - type: boolean - help: - zh_Hans: SSE接口调用时,用于控制每次返回内容方式是增量还是全量,不提供此参数时默认为增量返回,true 为增量返回,false 为全量返回。 - en_US: When the SSE interface is called, it is used to control whether the content is returned incrementally or in full. If this parameter is not provided, the default is incremental return. true means incremental return, false means full return. - required: false -- name: return_type - label: - zh_Hans: 回复类型 - en_US: Return Type - type: string - help: - zh_Hans: 用于控制每次返回内容的类型,空或者没有此字段时默认按照 json_string 返回,json_string 返回标准的 JSON 字符串,text 返回原始的文本内容。 - en_US: Used to control the type of content returned each time. When it is empty or does not have this field, it will be returned as json_string by default. json_string returns a standard JSON string, and text returns the original text content. - required: false - options: - - text - - json_string \ No newline at end of file + - name: temperature + use_template: temperature + default: 0.95 + min: 0.0 + max: 1.0 + help: + zh_Hans: 采样温度,控制输出的随机性,必须为正数取值范围是:(0.0,1.0],不能等于 0,默认值为 0.95 值越大,会使输出更随机,更具创造性;值越小,输出会更加稳定或确定建议您根据应用场景调整 top_p 或 temperature 参数,但不要同时调整两个参数。 + en_US: Sampling temperature, controls the randomness of the output, must be a positive number. The value range is (0.0,1.0], which cannot be equal to 0. The default value is 0.95. The larger the value, the more random and creative the output will be; the smaller the value, The output will be more stable or certain. It is recommended that you adjust the top_p or temperature parameters according to the application scenario, but do not adjust both parameters at the same time. + - name: top_p + use_template: top_p + default: 0.7 + help: + zh_Hans: 用温度取样的另一种方法,称为核取样取值范围是:(0.0, 1.0) 开区间,不能等于 0 或 1,默认值为 0.7 模型考虑具有 top_p 概率质量tokens的结果例如:0.1 意味着模型解码器只考虑从前 10% 的概率的候选集中取 tokens 建议您根据应用场景调整 top_p 或 temperature 参数,但不要同时调整两个参数。 + en_US: Another method of temperature sampling is called kernel sampling. The value range is (0.0, 1.0) open interval, which cannot be equal to 0 or 1. The default value is 0.7. The model considers the results with top_p probability mass tokens. For example 0.1 means The model decoder only considers tokens from the candidate set with the top 10% probability. It is recommended that you adjust the top_p or temperature parameters according to the application scenario, but do not adjust both parameters at the same time. + - name: incremental + label: + zh_Hans: 增量返回 + en_US: Incremental + type: boolean + help: + zh_Hans: SSE接口调用时,用于控制每次返回内容方式是增量还是全量,不提供此参数时默认为增量返回,true 为增量返回,false 为全量返回。 + en_US: When the SSE interface is called, it is used to control whether the content is returned incrementally or in full. If this parameter is not provided, the default is incremental return. true means incremental return, false means full return. + required: false + - name: return_type + label: + zh_Hans: 回复类型 + en_US: Return Type + type: string + help: + zh_Hans: 用于控制每次返回内容的类型,空或者没有此字段时默认按照 json_string 返回,json_string 返回标准的 JSON 字符串,text 返回原始的文本内容。 + en_US: Used to control the type of content returned each time. When it is empty or does not have this field, it will be returned as json_string by default. json_string returns a standard JSON string, and text returns the original text content. + required: false + options: + - text + - json_string diff --git a/api/core/model_runtime/model_providers/zhipuai/text_embedding/text_embedding.yaml b/api/core/model_runtime/model_providers/zhipuai/text_embedding/text_embedding.yaml index 961721ebe7..b9f5bc6397 100644 --- a/api/core/model_runtime/model_providers/zhipuai/text_embedding/text_embedding.yaml +++ b/api/core/model_runtime/model_providers/zhipuai/text_embedding/text_embedding.yaml @@ -1,4 +1,4 @@ model: text_embedding model_type: text-embedding model_properties: - context_size: 512 \ No newline at end of file + context_size: 512 diff --git a/api/core/model_runtime/model_providers/zhipuai/zhipuai.yaml b/api/core/model_runtime/model_providers/zhipuai/zhipuai.yaml index 608a765baf..303a549128 100644 --- a/api/core/model_runtime/model_providers/zhipuai/zhipuai.yaml +++ b/api/core/model_runtime/model_providers/zhipuai/zhipuai.yaml @@ -15,17 +15,17 @@ help: url: en_US: https://open.bigmodel.cn/usercenter/apikeys supported_model_types: -- llm -- text-embedding + - llm + - text-embedding configurate_methods: -- predefined-model + - predefined-model provider_credential_schema: credential_form_schemas: - - variable: api_key - label: - en_US: APIKey - type: secret-input - required: true - placeholder: - zh_Hans: 在此输入您的 APIKey - en_US: Enter your APIKey + - variable: api_key + label: + en_US: APIKey + type: secret-input + required: true + placeholder: + zh_Hans: 在此输入您的 APIKey + en_US: Enter your APIKey diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index 12b8a4a2c0..4cac082a26 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -236,7 +236,7 @@ services: # ports: # - "5432:5432" healthcheck: - test: ["CMD", "pg_isready"] + test: [ "CMD", "pg_isready" ] interval: 1s timeout: 3s retries: 30