chore
This commit is contained in:
		
							parent
							
								
									a057bb6c5b
								
							
						
					
					
						commit
						02d5d641d1
					
				@ -96,7 +96,7 @@ def add_state(body: AddStateBody):
 | 
			
		||||
        quick_log(
 | 
			
		||||
            None,
 | 
			
		||||
            None,
 | 
			
		||||
            f"New Trie Id: {id}\nTrie Len: {len(trie)}\nTrie Buff Size: {trie.buff_size()}\nDtrie Buff Size Of Id: {_get_a_dtrie_buff_size(dtrie[id])}",
 | 
			
		||||
            f"New Trie Id: {id}\nTrie Len: {len(trie)}\nTrie Buff Size: {trie.buff_size()}\nDtrie Buff Size Of Id: {__get_a_dtrie_buff_size(dtrie[id])}",
 | 
			
		||||
        )
 | 
			
		||||
        return "success"
 | 
			
		||||
    except Exception as e:
 | 
			
		||||
@ -124,7 +124,7 @@ class LongestPrefixStateBody(BaseModel):
 | 
			
		||||
    prompt: str
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_a_dtrie_buff_size(dtrie_v):
 | 
			
		||||
def __get_a_dtrie_buff_size(dtrie_v):
 | 
			
		||||
    # print(sys.getsizeof(dtrie_v["tokens"][0]))  # str
 | 
			
		||||
    # print(sys.getsizeof(dtrie_v["tokens"][0]) * len(dtrie_v["tokens"]))
 | 
			
		||||
    # print(dtrie_v["state"][0][0].element_size())
 | 
			
		||||
 | 
			
		||||
@ -1,3 +1,5 @@
 | 
			
		||||
echo $@
 | 
			
		||||
 | 
			
		||||
if [[ ${cnMirror} == 1 ]]; then
 | 
			
		||||
  export PIP_INDEX_URL="https://pypi.tuna.tsinghua.edu.cn/simple"
 | 
			
		||||
  if grep -q "mirrors.aliyun.com" /etc/apt/sources.list; then
 | 
			
		||||
 | 
			
		||||
@ -130,7 +130,7 @@ export const Configs: FC = observer(() => {
 | 
			
		||||
            setSelectedIndex(0);
 | 
			
		||||
            setSelectedConfig(commonStore.modelConfigs[0]);
 | 
			
		||||
          }} />
 | 
			
		||||
          <ToolTipButton desc={mq ? '' : t('Save Config')} icon={<Save20Regular />} text={mq ? t('Save Config') : ''}
 | 
			
		||||
          <ToolTipButton desc={mq ? '' : t('Save Config')} icon={<Save20Regular />} text={mq ? t('Save Config') : null}
 | 
			
		||||
            onClick={onClickSave} />
 | 
			
		||||
        </div>
 | 
			
		||||
        <div className="flex items-center gap-4">
 | 
			
		||||
 | 
			
		||||
@ -219,7 +219,7 @@ const Terminal: FC = observer(() => {
 | 
			
		||||
      WslStart().then(() => {
 | 
			
		||||
        addWslMessage('WSL> ' + input);
 | 
			
		||||
        setInput('');
 | 
			
		||||
        WslCommand(input).catch(showError);
 | 
			
		||||
        WslCommand(input).then(WindowShow).catch(showError);
 | 
			
		||||
      }).catch(showError);
 | 
			
		||||
    }
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user