瀏覽代碼

fix: typo and check (#5287)

crazywoola 10 月之前
父節點
當前提交
9a64aa76c1

+ 1 - 1
api/core/model_runtime/model_providers/localai/llm/llm.py

@@ -73,7 +73,7 @@ class LocalAILanguageModel(LargeLanguageModel):
 
 
         def tokens(text: str):
         def tokens(text: str):
             """
             """
-                We cloud not determine which tokenizer to use, cause the model is customized.
+                We could not determine which tokenizer to use, cause the model is customized.
                 So we use gpt2 tokenizer to calculate the num tokens for convenience.
                 So we use gpt2 tokenizer to calculate the num tokens for convenience.
             """
             """
             return self._get_num_tokens_by_gpt2(text)
             return self._get_num_tokens_by_gpt2(text)

+ 2 - 2
web/app/components/header/account-setting/account-page/index.tsx

@@ -163,7 +163,7 @@ export default function AccountPage() {
             wrapperClassName='mt-2'
             wrapperClassName='mt-2'
           />
           />
         )}
         )}
-        <Button className='mt-2 font-medium text-[#D92D20] !px-3 !py-[7px] !text-[13px]' onClick={() => setShowDeleteAccountModal(true)}>{t('common.account.delete')}</Button>
+        {!IS_CE_EDITION && <Button className='mt-2 font-medium text-[#D92D20] !px-3 !py-[7px] !text-[13px]' onClick={() => setShowDeleteAccountModal(true)}>{t('common.account.delete')}</Button>}
       </div>
       </div>
       {editNameModalVisible && (
       {editNameModalVisible && (
         <Modal
         <Modal
@@ -248,7 +248,7 @@ export default function AccountPage() {
         <Modal
         <Modal
           className={classNames('p-8 max-w-[480px] w-[480px]', s.bg)}
           className={classNames('p-8 max-w-[480px] w-[480px]', s.bg)}
           isShow={showDeleteAccountModal}
           isShow={showDeleteAccountModal}
-          onClose={() => {}}
+          onClose={() => { }}
         >
         >
           <div className='absolute right-4 top-4 p-2 cursor-pointer' onClick={() => setShowDeleteAccountModal(false)}>
           <div className='absolute right-4 top-4 p-2 cursor-pointer' onClick={() => setShowDeleteAccountModal(false)}>
             <XClose className='w-4 h-4 text-gray-500' />
             <XClose className='w-4 h-4 text-gray-500' />