Skip to content

Commit

Permalink
fix: update summarizer app to use correct url for token count
Browse files Browse the repository at this point in the history
Fixes #802

Signed-off-by: Jeff MAURY <[email protected]>
  • Loading branch information
jeffmaury committed Oct 24, 2024
1 parent 2b09302 commit 4d15f1b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def chunk_text(text):
for chunk in text_chunks:
chunk = chunk.page_content
chunk_kwargs = request_kwargs | {"json": {"input": chunk}}
count = requests.post(f"{model_service[:-2]}/v1/extras/tokenize/count", **chunk_kwargs).content
count = requests.post(f"{model_service[:-2]}extras/tokenize/count", **chunk_kwargs).content
count = json.loads(count)["count"]
if count >= 2048:
split_append_chunk(chunk, chunks)
Expand Down

0 comments on commit 4d15f1b

Please sign in to comment.