mirror of
https://github.com/open-webui/open-webui
synced 2024-11-06 16:59:42 +00:00
refac
This commit is contained in:
parent
925a903e38
commit
f2c78ac0fb
@ -667,7 +667,11 @@ def save_docs_to_vector_db(
|
|||||||
add_start_index=True,
|
add_start_index=True,
|
||||||
)
|
)
|
||||||
elif app.state.config.TEXT_SPLITTER == "token":
|
elif app.state.config.TEXT_SPLITTER == "token":
|
||||||
tiktoken.get_encoding(app.state.config.TIKTOKEN_ENCODING_NAME)
|
log.info(
|
||||||
|
f"Using token text splitter: {app.state.config.TIKTOKEN_ENCODING_NAME}"
|
||||||
|
)
|
||||||
|
|
||||||
|
tiktoken.get_encoding(str(app.state.config.TIKTOKEN_ENCODING_NAME))
|
||||||
text_splitter = TokenTextSplitter(
|
text_splitter = TokenTextSplitter(
|
||||||
encoding_name=str(app.state.config.TIKTOKEN_ENCODING_NAME),
|
encoding_name=str(app.state.config.TIKTOKEN_ENCODING_NAME),
|
||||||
chunk_size=app.state.config.CHUNK_SIZE,
|
chunk_size=app.state.config.CHUNK_SIZE,
|
||||||
|
Loading…
Reference in New Issue
Block a user