This repository was archived by the owner on Aug 10, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +5
-7
lines changed
Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -167,10 +167,9 @@ def get_arkose_token(
167167 URLs: list[str] - URLs of the images or audio files
168168 """
169169 resp = requests .get (
170- "https://arkose-token.tms.im/"
171- # (CAPTCHA_URL + "start?download_images=true")
172- # if download_images
173- # else CAPTCHA_URL + "start",
170+ (CAPTCHA_URL + "start?download_images=true" )
171+ if download_images
172+ else CAPTCHA_URL + "start" ,
174173 )
175174 resp_json : dict = resp .json ()
176175 if resp .status_code == 200 :
Original file line number Diff line number Diff line change @@ -166,8 +166,7 @@ def get_token_count(self, convo_id: str = "default") -> int:
166166 # every message follows <im_start>{role/name}\n{content}<im_end>\n
167167 num_tokens += 5
168168 for key , value in message .items ():
169- if value :
170- num_tokens += len (encoding .encode (value ))
169+ num_tokens += len (encoding .encode (value ))
171170 if key == "name" : # if there's a name, the role is omitted
172171 num_tokens += 5 # role is always required and always 1 token
173172 num_tokens += 5 # every reply is primed with <im_start>assistant
Original file line number Diff line number Diff line change 1- version = "6.7.7 "
1+ version = "6.7.5 "
You can’t perform that action at this time.
0 commit comments