Merge cluster to master #3
|
@ -29,6 +29,7 @@ def tokenize(prompt: str, backend_url: str) -> int:
|
||||||
# Define a function to send a chunk to the server
|
# Define a function to send a chunk to the server
|
||||||
def send_chunk(chunk):
|
def send_chunk(chunk):
|
||||||
try:
|
try:
|
||||||
|
XXX
|
||||||
r = requests.post(f'{backend_url}/tokenize', json={'input': chunk}, verify=opts.verify_ssl, timeout=opts.backend_generate_request_timeout)
|
r = requests.post(f'{backend_url}/tokenize', json={'input': chunk}, verify=opts.verify_ssl, timeout=opts.backend_generate_request_timeout)
|
||||||
j = r.json()
|
j = r.json()
|
||||||
return j['length']
|
return j['length']
|
||||||
|
|
Reference in New Issue