Чтобы продолжать двигаться вперед, я получил этот проект на github:
https://github.com/Cbase-ai/asana-task-agent
Я все устанавливаю. Что содержит:
- python 3.9.13
- x64 windows Intel
- env, конечно.
Это то, ч т о е с т ь : < / p > < b r / > < c o d e > a i o h a p p y e y e b a l l s 2 . 4 . 3 < b r / > a i o h t t p 3 . 1 0 . 1 0 < b r / > a i o s i g n a l 1 . 3 . 1 < b r / > a l t a i r 5 . 4 . 1 < b r / > a n n o t a t e d - t y p e s 0 . 7 . 0 < b r / > a n t h r o p i c 0 . 3 8 . 0 < b r / > a n y i o 4 . 6 . 2 . p o s t 1 < b r / > a r g i l l a 2 . 4 . 0 < b r / > a s a n a 5 . 0 . 7 < b r / > a s g i r e f 3 . 8 . 1 < b r / > a s y n c - t i m e o u t 4 . 0 . 3 < b r / > a t t r s 2 4 . 2 . 0 < b r / > b a c k o f f 2 . 2 . 1 < b r / > b c r y p t 4 . 2 . 0 < b r / > b l i n k e r 1 . 8 . 2 < b r / > b u i l d 1 . 2 . 2 . p o s t 1 < b r / > c a c h e t o o l s 5 . 5 . 0 < b r / > c e r t i f i 2 0 2 4 . 8 . 3 0 < b r / > c f f i 1 . 1 7 . 1 < b r / > c h a r s e t - n o r m a l i z e r 3 . 4 . 0 < b r / > c h r o m a - h n s w l i b 0 . 7 . 6 < b r / > c h r o m a d b 0 . 5 . 1 7 < b r / > c l i c k 8 . 1 . 7 < b r / > c o l o r a m a 0 . 4 . 6 < b r / > c o l o r e d l o g s 1 5 . 0 . 1 < b r / > c r y p t o g r a p h y 4 3 . 0 . 3 < b r / > d a t a c l a s s e s - j s o n 0 . 6 . 7 < b r / > d a t a s e t s 3 . 1 . 0 < b r / > d e f u s e d x m l 0 . 7 . 1 < b r / > D e p r e c a t e d 1 . 2 . 1 4 < b r / > d i l l 0 . 3 . 8 < b r / > d i s t r o 1 . 9 . 0 < b r / > d u r a t i o n p y 0 . 9 < b r / > e x c e p t i o n g r o u p 1 . 2 . 2 < b r / > f a s t a p i 0 . 1 1 5 . 4 < b r / > f i l e l o c k 3 . 1 6 . 1 < b r / > f l a t b u f f e r s 2 4 . 3 . 2 5 < b r / > f r o z e n l i s t 1 . 5 . 0 < b r / > f s s p e c 2 0 2 4 . 9 . 0 < b r / > g i t d b 4 . 0 . 1 1 < b r / > G i t P y t h o n 3 . 1 . 4 3 < b r / > g o o g l e - a u t h 2 . 3 5 . 0 < b r / > g o o g l e a p i s - c o m m o n - p r o t o s 1 . 6 5 . 0 < b r / > g r e e n l e t 3 . 1 . 1 < b r / > g r p c i o 1 . 6 7 . 1 < b r / > g r p c i o - s t a t u s 1 . 4 8 . 2 < b r / > h 1 1 0 . 1 4 . 0 < b r / > h t t p c o r e 1 . 0 . 6 < b r / > h t t p t o o l s 0 . 6 . 4 < b r / > h t t p x 0 . 2 7 . 2 < b r / > h u g g i n g f a c e - h u b 0 . 2 6 . 2 < b r / > h u m a n f r i e n d l y 1 0 . 0 < b r / > i d n a 3 . 1 0 < b r / > i m p o r t l i b _ m e t a d a t a 8 . 4 . 0 < b r / > i m p o r t l i b _ r e s o u r c e s 6 . 4 . 5 < b r / > J i n j a 2 3 . 1 . 4 < b r / > j i t e r 0 . 7 . 0 < b r / > j o b l i b 1 . 4 . 2 < b r / > j s o n p a t c h 1 . 3 3 < b r / > j s o n p o i n t e r 3 . 0 . 0 < b r / > j s o n s c h e m a 4 . 2 3 . 0 < b r / > j s o n s c h e m a - s p e c i f i c a t i o n s 2 0 2 4 . 1 0 . 1 < b r / > k u b e r n e t e s 3 1 . 0 . 0 < b r / > l a n g c h a i n 0 . 2 . 6 < b r / > l a n g c h a i n - a n t h r o p i c 0 . 1 . 1 6 < b r / > l a n g c h a i n - c h r o m a 0 . 1 . 2 < b r / > l a n g c h a i n - c o m m u n i t y 0 . 2 . 6 < b r / > l a n g c h a i n - c o r e 0 . 2 . 4 3 < b r / > l a n g c h a i n - o p e n a i 0 . 1 . 1 0 < b r / > l a n g c h a i n - t e x t - s p l i t t e r s 0 . 2 . 4 < b r / > l a n g s m i t h 0 . 1 . 1 3 9 < b r / > l x m l 5 . 3 . 0 < b r / > m a r k d o w n - i t - p y 3 . 0 . 0 < b r / > M a r k u p S a f e 3 . 0 . 2 < b r / > m a r s h m a l l o w 3 . 2 3 . 1 < b r / > m d u r l 0 . 1 . 2 < b r / > m m h 3 5 . 0 . 1 < b r / > m o n o t o n i c 1 . 6 < b r / > m p m a t h 1 . 3 . 0 < b r / > m u l t i d i c t 6 . 1 . 0 < b r / > m u l t i p r o c e s s 0 . 7 0 . 1 6 < b r / > m y p y - e x t e n s i o n s 1.0.0
narwhals 1.13.1
networkx 3.2.1
nltk 3.9.1
numpy 1.26.4
oauthlib 3.2.2
onnxruntime 1.19.2
openai 1.53.0
opentelemetry-api 1.27.0
opentelemetry-exporter-otlp-proto-common 1.27.0
opentelemetry-exporter-otlp-proto-grpc 1.27.0
opentelemetry-instrumentation 0.48b0
opentelemetry-instrumentation-asgi 0.48b0
opentelemetry-instrumentation-fastapi 0.48b0
opentelemetry-proto 1.27.0
opentelemetry-sdk 1.27.0
opentelemetry-semantic-conventions 0.48b0
opentelemetry-util-http 0.48b0
orjson 3.10.11
overrides 7.7.0
packaging 24.1
pandas 2.2.3
pdfminer.six 20221105
pdfplumber 0.9.0
pillow 10.4.0
pip 22.0.4
posthog 3.7.0
propcache 0.2.0
protobuf 4.25.5
pyarrow 18.0.0
pyasn1 0.6.1
pyasn1_modules 0.4.1
pycparser 2.22
pydantic 2.9.2
pydantic_core 2.23.4
pydeck 0.9.1
Pygments 2.18.0
PyPika 0.48.9
pyproject_hooks 1.2.0
pyreadline3 3.5.4
python-dateutil 2.9.0.post0
python-dotenv 0.13.0
pytz 2024.2
PyYAML 6.0.2
referencing 0.35.1
regex 2024.9.11
requests 2.32.3
requests-oauthlib 2.0.0
requests-toolbelt 1.0.0
rich 13.9.4
rpds-py 0.20.1
rsa 4.9
safetensors 0.4.5
scikit-learn 1.5.2
scipy 1.13.1
sentence-transformers 2.2.2
sentencepiece 0.2.0
setuptools 58.1.0
shellingham 1.5.4
six 1.16.0
smmap 5.0.1
sniffio 1.3.1
SQLAlchemy 2.0.36
starlette 0.41.2
streamlit 1.36.0
sympy 1.13.1
tenacity 8.5.0
threadpoolctl 3.5.0
tiktoken 0.8.0
tokenizers 0.20.1
toml 0.10.2
tomli 2.0.2
torch 2.5.1
torchvision 0.20.1
tornado 6.4.1
tqdm 4.66.6
transformers 4.46.1
typer 0.12.5
typing_extensions 4.12.2
typing-inspect 0.9.0
tzdata 2024.2
unstructured 0.3.0
urllib3 2.2.3
uvicorn 0.32.0
Wand 0.6.13
watchdog 4.0.2
watchfiles 0.24.0
websocket-client 1.8.0
websockets 13.1
wrapt 1.16.0
xxhash 3.5.0
yarl 1.17.1
zipp 3.20.2
Код: Выделить всё
streamlit run rag-task-agent.py
You can now view your Streamlit app in your browser.
Local URL: http://localhost:8501
Network URL: http://192.168.1.221:8501
C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\rag-task-agent.py:47: LangChainDeprecationWarning: The class `HuggingFaceEmbeddings` was deprecated in LangChain 0.2.2 and will be removed in 0.3.0. An updated version of the class exists in the langchain-huggingface package and should be used instead. To use it run `pip install -U langchain-huggingface` and import as `from langchain_huggingface import HuggingFaceEmbeddings`.
embedding_function = SentenceTransformerEmbeddings(model_name="all-MiniLM-L6-v2")
2024-11-04 11:59:25.950 Uncaught app exception
Traceback (most recent call last):
File "C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\env39\lib\site-packages\langchain_community\embeddings\huggingface.py", line 71, in __init__
import sentence_transformers
File "C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\env39\lib\site-packages\sentence_transformers\__init__.py", line 3, in
from .datasets import SentencesDataset, ParallelSentencesDataset
File "C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\env39\lib\site-packages\sentence_transformers\datasets\__init__.py", line 3, in
from .ParallelSentencesDataset import ParallelSentencesDataset
File "C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\env39\lib\site-packages\sentence_transformers\datasets\ParallelSentencesDataset.py", line 4, in
from .. import SentenceTransformer
File "C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\env39\lib\site-packages\sentence_transformers\SentenceTransformer.py", line 12, in
from huggingface_hub import HfApi, HfFolder, Repository, hf_hub_url, cached_download
ImportError: cannot import name 'cached_download' from 'huggingface_hub' (C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\env39\lib\site-packages\huggingface_hub\__init__.py)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\env39\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 589, in _run_script
exec(code, module.__dict__)
File "C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\rag-task-agent.py", line 52, in
db = get_chroma_instance()
File "C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\env39\lib\site-packages\streamlit\runtime\caching\cache_utils.py", line 168, in wrapper
return cached_func(*args, **kwargs)
File "C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\env39\lib\site-packages\streamlit\runtime\caching\cache_utils.py", line 197, in __call__
return self._get_or_create_cached_value(args, kwargs)
File "C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\env39\lib\site-packages\streamlit\runtime\caching\cache_utils.py", line 224, in _get_or_create_cached_value
return self._handle_cache_miss(cache, value_key, func_args, func_kwargs)
File "C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\env39\lib\site-packages\streamlit\runtime\caching\cache_utils.py", line 280, in _handle_cache_miss
computed_value = self._info.func(*func_args, **func_kwargs)
File "C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\rag-task-agent.py", line 47, in get_chroma_instance
embedding_function = SentenceTransformerEmbeddings(model_name="all-MiniLM-L6-v2")
File "C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\env39\lib\site-packages\langchain_core\_api\deprecation.py", line 215, in warn_if_direct_instance
return wrapped(self, *args, **kwargs)
File "C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\env39\lib\site-packages\langchain_community\embeddings\huggingface.py", line 74, in __init__
raise ImportError(
ImportError: Could not import sentence_transformers python package. Please install it with `pip install sentence-transformers`.
2024-11-04 11:59:26.496 Examining the path of torch.classes raised: Tried to instantiate class '__path__._path', but it does not exist! Ensure that it is registered via torch::class_
2024-11-04 11:59:38.355 Uncaught app exception
Traceback (most recent call last):
File "C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\env39\lib\site-packages\langchain_community\embeddings\huggingface.py", line 71, in __init__
import sentence_transformers
File "C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\env39\lib\site-packages\sentence_transformers\__init__.py", line 3, in
from .datasets import SentencesDataset, ParallelSentencesDataset
File "C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\env39\lib\site-packages\sentence_transformers\datasets\__init__.py", line 3, in
from .ParallelSentencesDataset import ParallelSentencesDataset
File "C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\env39\lib\site-packages\sentence_transformers\datasets\ParallelSentencesDataset.py", line 4, in
from .. import SentenceTransformer
File "C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\env39\lib\site-packages\sentence_transformers\SentenceTransformer.py", line 12, in
from huggingface_hub import HfApi, HfFolder, Repository, hf_hub_url, cached_download
ImportError: cannot import name 'cached_download' from 'huggingface_hub' (C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\env39\lib\site-packages\huggingface_hub\__init__.py)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\env39\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 589, in _run_script
exec(code, module.__dict__)
File "C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\rag-task-agent.py", line 52, in
db = get_chroma_instance()
File "C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\env39\lib\site-packages\streamlit\runtime\caching\cache_utils.py", line 168, in wrapper
return cached_func(*args, **kwargs)
File "C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\env39\lib\site-packages\streamlit\runtime\caching\cache_utils.py", line 197, in __call__
return self._get_or_create_cached_value(args, kwargs)
File "C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\env39\lib\site-packages\streamlit\runtime\caching\cache_utils.py", line 224, in _get_or_create_cached_value
return self._handle_cache_miss(cache, value_key, func_args, func_kwargs)
File "C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\env39\lib\site-packages\streamlit\runtime\caching\cache_utils.py", line 280, in _handle_cache_miss
computed_value = self._info.func(*func_args, **func_kwargs)
File "C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\rag-task-agent.py", line 47, in get_chroma_instance
embedding_function = SentenceTransformerEmbeddings(model_name="all-MiniLM-L6-v2")
File "C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\env39\lib\site-packages\langchain_core\_api\deprecation.py", line 215, in warn_if_direct_instance
return wrapped(self, *args, **kwargs)
File "C:\Users\alute\Desktop\ASANAGPT\ASANAGPT4\asana-task-agent\env39\lib\site-packages\langchain_community\embeddings\huggingface.py", line 74, in __init__
raise ImportError(
ImportError: Could not import sentence_transformers python package. Please install it with `pip install sentence-transformers`.
2024-11-04 11:59:38.805 Examining the path of torch.classes raised: Tried to instantiate class '__path__._path', but it does not exist! Ensure that it is registered via torch::class_
Возможно, файл требований взят из какого-то старого проекта? Трудно сказать
Я пробовал много комбинаций с библиотеками, не все точно.
Запустите код и поймете, что происходит
Подробнее здесь: https://stackoverflow.com/questions/791 ... ers-python
Мобильная версия