Skip to content

Commit

Permalink
style: add chatgpt params desc
Browse files Browse the repository at this point in the history
  • Loading branch information
jamebal committed Sep 12, 2024
1 parent 011d8a4 commit 3c84a1a
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/components/common/Setting/General.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { computed, onMounted, ref } from 'vue'
import { NButton, NDivider, NInput, NPopconfirm, NSelect, NSlider, NSwitch, useMessage } from 'naive-ui'
import { NButton, NDescriptions, NDescriptionsItem, NDivider, NInput, NPopconfirm, NSelect, NSlider, NSwitch, useMessage } from 'naive-ui'
import { UserConfig } from '@/components/common/Setting/model'
import type { Language, Theme } from '@/store/modules/app/helper'
import { SvgIcon } from '@/components/common'
Expand Down Expand Up @@ -184,26 +184,34 @@ function handleImportButtonClick(): void {
</div>
</div>
<div class="flex items-center space-x-4">
<span class="flex-shrink-0 w-[100px]">temperature</span>
<span class="flex-shrink-0 w-[100px]">温度</span>
<div class="flex-1">
<div>{{ temperature }}</div>
<NSlider v-model:value="temperature" :step="0.01" :max="1" :min="0.1" style="width: 50%" />
</div>
</div>
<div class="flex items-center space-x-4">
<span class="flex-shrink-0 w-[100px]">top_p</span>
<span class="flex-shrink-0 w-[100px]">核采样</span>
<div class="flex-1">
<div>{{ top_p }}</div>
<NSlider v-model:value="top_p" :step="0.01" :max="1" :min="0.1" style="width: 50%" />
</div>
</div>
<div class="flex items-center space-x-4">
<span class="flex-shrink-0 w-[100px]">presence_penalty</span>
<span class="flex-shrink-0 w-[100px]">出现惩罚</span>
<div class="flex-1">
<div>{{ presencePenalty }}</div>
<NSlider v-model:value="presencePenalty" :step="0.1" :max="2" :min="-2" style="width: 50%" />
</div>
</div>
<NDescriptions label-placement="left" column="1">

Check failure on line 207 in src/components/common/Setting/General.vue

View workflow job for this annotation

GitHub Actions / typecheck

Type 'string' is not assignable to type 'number'.
<NDescriptionsItem label="创造性任务(如生成故事、对话)">
温度 = 0.7-1.0,核采样 = 0.9-1.0,出现惩罚 = 0.5-1.5
</NDescriptionsItem>
<NDescriptionsItem label="严谨任务(如回答问题、技术文档)">
温度 = 0.1-0.3,核采样 = 0.8-1.0,出现惩罚 = 0-0.5
</NDescriptionsItem>
</NDescriptions>
<div class="flex items-center space-x-4">
<span class="flex-shrink-0 w-[100px]">{{ $t('setting.saveUserInfo') }}</span>
<NButton type="primary" @click="updateUserInfo({ avatar, name, description, systemRole, temperature, top_p, presencePenalty, useAmount, redeemCardNo })">
Expand Down

0 comments on commit 3c84a1a

Please sign in to comment.