neumtry / pre-processing-playground Goto Github PK
View Code? Open in Web Editor NEWThis project forked from langchain-ai/text-split-explorer
This project forked from langchain-ai/text-split-explorer
App is installed under Win11 in conda vEnv D:\LLM\ETL\vETL & Python3.10.0
git cloned to D:\LLM\ETL\vETL\Pyproject
From GUI
ValueError: Invalid file C:\Users\user\AppData\Local\Temp\tmpeo5yaxcb. The FileType.UNK file type is not supported in partition.
From conda prompt
Traceback (most recent call last):
File "D:\LLM\ETL\vETL\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 552, in _run_script
exec(code, module.dict)
File "D:\LLM\ETL\vETL\PyProject\splitter.py", line 134, in
documents = document_loading(temp_file=file_path, loader_choice=loader_choice)
File "D:\LLM\ETL\vETL\PyProject\utils.py", line 50, in document_loading
return loader.load()
File "D:\LLM\ETL\vETL\lib\site-packages\langchain\document_loaders\unstructured.py", line 86, in load
elements = self._get_elements()
File "D:\LLM\ETL\vETL\lib\site-packages\langchain\document_loaders\unstructured.py", line 172, in _get_elements
return partition(filename=self.file_path, **self.unstructured_kwargs)
File "D:\LLM\ETL\vETL\lib\site-packages\unstructured\partition\auto.py", line 366, in partition
raise ValueError(f"{msg}. The {filetype} file type is not supported in partition.")
ValueError: Invalid file C:\Users\user\AppData\Local\Temp\tmpeo5yaxcb. The FileType.UNK file type is not supported in partition.
App is installed under Win11, conda vEnv (D:\LLM\ETL\vETL) & Python 3.10.0
GUI Error
AuthenticationError: No API key provided. You can set your API key in code using 'openai.api_key = ', or you can set the environment variable OPENAI_API_KEY=). If your API key is stored in a file, you can point the openai module at it with 'openai.api_key_path = '. You can generate API keys in the OpenAI web interface. See https://platform.openai.com/account/api-keys for details.
File "D:\LLM\ETL\vETL\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 552, in _run_script
exec(code, module.dict)
File "D:\LLM\ETL\vETL\PyProject\splitter.py", line 136, in
st.session_state.chunks = text_splitter(splitter_choice=splitter_choice, chunk_size=chunk_size, chunk_overlap=chunk_overlap, length_function=length_function, documents=documents)
File "D:\LLM\ETL\vETL\PyProject\utils.py", line 22, in text_splitter
splitter_code = llm_based_chunking_prep(documents[0].page_content)
File "D:\LLM\ETL\vETL\PyProject\SemanticHelpers\semantic_chunking.py", line 48, in llm_based_chunking_prep
chunking_strategy = llm_based_chunking_strategy(text=fixed_text)['content']
File "D:\LLM\ETL\vETL\PyProject\SemanticHelpers\semantic_chunking.py", line 20, in llm_based_chunking_strategy
response = openai.ChatCompletion.create(
File "D:\LLM\ETL\vETL\lib\site-packages\openai\api_resources\chat_completion.py", line 25, in create
return super().create(*args, **kwargs)
File "D:\LLM\ETL\vETL\lib\site-packages\openai\api_resources\abstract\engine_api_resource.py", line 149, in create
) = cls.__prepare_create_request(
File "D:\LLM\ETL\vETL\lib\site-packages\openai\api_resources\abstract\engine_api_resource.py", line 106, in __prepare_create_request
requestor = api_requestor.APIRequestor(
File "D:\LLM\ETL\vETL\lib\site-packages\openai\api_requestor.py", line 138, in init
self.api_key = key or util.default_api_key()
File "D:\LLM\ETL\vETL\lib\site-packages\openai\util.py", line 186, in default_api_key
raise openai.error.AuthenticationError(
Conda prompt Error
raceback (most recent call last):
File "D:\LLM\ETL\vETL\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 552, in _run_script
exec(code, module.dict)
File "D:\LLM\ETL\vETL\PyProject\splitter.py", line 136, in
st.session_state.chunks = text_splitter(splitter_choice=splitter_choice, chunk_size=chunk_size, chunk_overlap=chunk_overlap, length_function=length_function, documents=documents)
File "D:\LLM\ETL\vETL\PyProject\utils.py", line 22, in text_splitter
splitter_code = llm_based_chunking_prep(documents[0].page_content)
File "D:\LLM\ETL\vETL\PyProject\SemanticHelpers\semantic_chunking.py", line 48, in llm_based_chunking_prep
chunking_strategy = llm_based_chunking_strategy(text=fixed_text)['content']
File "D:\LLM\ETL\vETL\PyProject\SemanticHelpers\semantic_chunking.py", line 20, in llm_based_chunking_strategy
response = openai.ChatCompletion.create(
File "D:\LLM\ETL\vETL\lib\site-packages\openai\api_resources\chat_completion.py", line 25, in create
return super().create(*args, **kwargs)
File "D:\LLM\ETL\vETL\lib\site-packages\openai\api_resources\abstract\engine_api_resource.py", line 149, in create
) = cls.__prepare_create_request(
File "D:\LLM\ETL\vETL\lib\site-packages\openai\api_resources\abstract\engine_api_resource.py", line 106, in __prepare_create_request
requestor = api_requestor.APIRequestor(
File "D:\LLM\ETL\vETL\lib\site-packages\openai\api_requestor.py", line 138, in init
self.api_key = key or util.default_api_key()
File "D:\LLM\ETL\vETL\lib\site-packages\openai\util.py", line 186, in default_api_key
raise openai.error.AuthenticationError(
openai.error.AuthenticationError: No API key provided. You can set your API key in code using 'openai.api_key = ', or you can set the environment variable OPENAI_API_KEY=). If your API key is stored in a file, you can point the openai module at it with 'openai.api_key_path = '. You can generate API keys in the OpenAI web interface. See https://platform.openai.com/account/api-keys for details.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.