From 324ab382ad0d7bd78784c0a724a2cda2bc1504e4 Mon Sep 17 00:00:00 2001 From: ifduyue Date: Fri, 17 Nov 2023 05:15:58 +0800 Subject: [PATCH] Use List instead of list (#13443) Unify List usages in libs/langchain/langchain/text_splitter.py, only one place it's `list`, all other ocurrences are `List` --- libs/langchain/langchain/text_splitter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/langchain/langchain/text_splitter.py b/libs/langchain/langchain/text_splitter.py index d8b712b22a..25c121866a 100644 --- a/libs/langchain/langchain/text_splitter.py +++ b/libs/langchain/langchain/text_splitter.py @@ -647,7 +647,7 @@ class Tokenizer: """Overlap in tokens between chunks""" tokens_per_chunk: int """Maximum number of tokens per chunk""" - decode: Callable[[list[int]], str] + decode: Callable[[List[int]], str] """ Function to decode a list of token ids to a string""" encode: Callable[[str], List[int]] """ Function to encode a string to a list of token ids"""