diff --git a/backend-python/requirements_versions.txt b/backend-python/requirements_versions.txt index df9e09e..79a0167 100644 Binary files a/backend-python/requirements_versions.txt and b/backend-python/requirements_versions.txt differ diff --git a/backend-python/routes/state_cache.py b/backend-python/routes/state_cache.py index b8a836f..b3b8922 100644 --- a/backend-python/routes/state_cache.py +++ b/backend-python/routes/state_cache.py @@ -1,4 +1,4 @@ -from typing import Any, Dict +from typing import Any, Dict, List from utils.log import quick_log from fastapi import APIRouter, HTTPException, Request, Response, status from pydantic import BaseModel @@ -31,7 +31,7 @@ def init(): class AddStateBody(BaseModel): prompt: str - tokens: list[str] + tokens: List[str] state: Any logits: Any diff --git a/backend-python/rwkv_pip/rwkv_tokenizer.py b/backend-python/rwkv_pip/rwkv_tokenizer.py index 2d275f5..e969eac 100644 --- a/backend-python/rwkv_pip/rwkv_tokenizer.py +++ b/backend-python/rwkv_pip/rwkv_tokenizer.py @@ -72,9 +72,9 @@ class TRIE_TOKENIZER: for t, i in self.token2idx.items(): _ = self.root.add(t, val=(t, i)) - def encodeBytes(self, src: bytes) -> list[int]: + def encodeBytes(self, src: bytes): idx: int = 0 - tokens: list[int] = [] + tokens = [] while idx < len(src): _idx: int = idx idx, _, values = self.root.find_longest(src, idx)