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`
This commit is contained in:
ifduyue 2023-11-17 05:15:58 +08:00 committed by GitHub
parent b029d9f4e6
commit 324ab382ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"""